This WordPress Answers page explains the differences between the query_post() and get_posts() functions, and their relation to the WP_Query class. They both use WP_Query internally, but should be used in different contexts. Using them in the wrong context could lead to bugs that are hard to track down.