wordpress loop to get the posts

<?php if (have_posts()): query_posts(”);

while (have_posts()): the_post();
// Content here
the_title();
the_content();
the_post_thumbnail();

endwhile;
endif;
?>

You can use different conditions inside query posts, For more details : Query posts parameters .