The temporary residence permit is may be obtained up to 3 years. However, its expiration date may be shorter: it depends on the reason of your stay.
The procedure of legalizing the temporary stay takes places in the Voivodeship Office in the department for foreigners. It should be the office of the voivodeship where the foreigner lives.
If you want to apply successfully for the temporary residence permit, you need to have the grounds of your stay in Poland documented. For example, these may be:
A foreigner, who applies for a temporary residence permit, should be fingerprinted in order to include the fingerprints in the residence card. If this formal requirement is not fulfilled, the application is automatically refused.
Among these, who cannot apply for a temporary residence permit, are: foreigners with a refugee status, granted a subsidiary protection, applying for an asylum, long-term EU residents and these who stay in Poland on the basis of Schengen visa.
The temporary residence permit may be cancelled in some justified cases. The most often situation is when a foreigner loses his/her job and has no other perspective of employment in Poland, is listed in the SIS (Schengen Information System) or has no health insurance.
Note: the permit is not prolonged automatically, so foreigner wanting to stay in Poland needs to apply for a new permit. If he does not obtain it, he/she has to leave Poland before the expiration date of the document.
More may be found on the website of the Office for Foreigners.