prepare takes an SQL statement as an argument and returns a statement handle. prepare takes the SQL statement and stores it in an internal, compiled form. It also gets the SQL statement ready for the execute function call.
Example:
$statement_handle = $db_handle->prepare("SELECT * FROM library");