You need to use the function pll_the_languages()
to get the language switcher.
It has a bunch of arguments which you can use to customise the language switcher:
$args is an optional array parameter. Options are:
‘dropdown’ => displays a list if set to 0, a dropdown list if set to 1 (default: 0) ‘show_names’ => displays language names if set to 1 (default: 1) ‘display_names_as’ => either ‘name’ or ‘slug’ (default: ‘name’) ‘show_flags’ => displays flags if set to 1 (default: 0) ‘hide_if_empty’ => hides languages with no posts (or pages) if set to 1 (default: 1) ‘force_home’ => forces link to homepage if set to 1 (default: 0) ‘echo’ => echoes if set to 1, returns a string if set to 0 (default: 1) ‘hide_if_no_translation’ => hides the language if no translation exists if set to 1 (default: 0) ‘hide_current’=> hides the current language if set to 1 (default: 0) ‘post_id’ => if set, displays links to translations of the post (or page) defined by post_id (default: null) ‘raw’ => use this to create your own custom language switcher (default:0)
The function reference for Polylang is available here: https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/