The WordPress function
query_posts let's you filter the loop, which makes it easy to pick which posts you want to display on the page.
If you don’t want to show all your posts you can filter the Loop, for example in a widget with featured content that you only want to show posts from the category ‘featured’.
query_posts before the loop. All the available filters can be found in the WordPress documentation.