This plugin is documented rather good in https://polylang.wordpress.com/documentation.
The developers documentation states the following logic as a means to generate URL's for different translations of the same post
<?php while ( have_posts() ) : the_post(); ?>
<ul class='translations'><?php pll_the_languages(array('post_id' =>; $post->ID)); ?></ul>
<?php the_content(); ?>
<?php endwhile; ?>
If you want more influence on what is rendered, inspet pll_the_languages
function and copy it's behaviour to your own output implementation
As you want buttons to switch language, this page: https://polylang.wordpress.com/documentation/frequently-asked-questions/the-language-switcher/ will give you the required info.
An implementation example:
<ul><?php pll_the_languages();?></ul>
Then style with CSS to create buttons, flags or whatever you want. It is also possible to use a widget for this, provided by te plugin
All plugins functions are explained here: https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
In this case use:
pll_current_language();