Stored procedures are pre-compiled sets of SQL statements that are stored in a database. Think of them as reusable blocks of code that can be executed multiple times. They encapsulate database logic, making it easier to manage and maintain. This encapsulation also improves security by hiding the underlying SQL code from users. Instead, users interact with the procedure through a simpler interface, reducing the risk of SQL injection attacks. Stored procedures are particularly useful for complex operations that involve multiple steps or for frequently used tasks. They are compiled once and stored in the database, so subsequent executions are faster because the database engine doesn't need to parse the SQL code each time. This leads to improved performance, especially for frequently accessed data.