How to use pagination?

change this line:

<?php query_posts('cat=19&posts_per_page=10');  

to

<?php query_posts('cat=19&posts_per_page=10&paged='.get_query_var('paged'));  

and
add the code for ‘pagenavi’ before the wp_reset_query();, for instance:

    <?php endwhile; endif; 
    if( function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { posts_nav_link(); }
      wp_reset_query(); ?>