How to get the first post and second post in a wordpress blog?

Have you tried using WP_Query()?

$query = new WP_Query( 'posts_per_page=2' );

You can also split it into two quieries if you must, with an offset:

$query = new WP_Query( 'posts_per_page' => 1 ) ); // First post
$query = new WP_Query( 'posts_per_page' => 1, 'offset=1' ) ); // Second post