This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1) Query optimization by the database. This also happens in case of a PreparedStatement, but because it uses bind variables, optimization can be more limited. In practice the cost of recompilation usually outweighs the performance gained by further optimizing the query.
2) The database prepares and caches the execution plan of the SQL query that results from the PreparedStatement.
3) The database runs the execution plan.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.