Get WordPress Post Permalink

If in main loop, you can do:

<?php echo get_permalink(); ?>

if out in main loop, you must give post id.

<?php echo get_permalink( $post->ID ); ?>