A PESEL is a Polish 11-digit identification number that is unique, and results useful in many bureaucratic procedures (such as tax declarations and healthcare). It is issued by the City Council (Urząd Miasta) in the place of your residence.
It is not obligatory to have a PESEL number – however, it makes your life much easier. It is issued automatically if you register in the place of you stay and you have i.a. a permanent residence permit. Holders of temporary residence permit need to apply for the PESEL themselves if they would like to obtain it (and as of 2018, they no longer have to justify this need).