VISA-FREE MOVEMENT– Citizens of Ukraine (and some other countries, see the link) who are staying in Poland on the basis of visa-free movement (holders of valid biometric passports) in order to undertake legal work may register a statement on employment of a foreigner.
The employer registers the statement with the Labour Office.
The procedure is very fast (max 7 days).
More details: https://www.biznes.gov.pl/pl/opisy-procedur/-/proc/1610
Registering this statement also significantly simplifies subsequent procedures for legalizing residence and work.
VISA– Persons who entered on the basis of a visa (with the exception of a tourist visa  and a visa granted for the purpose of obtaining temporary protection) may legally work in the territory of the Republic of Poland after registering a declaration (as above) or obtaining a work permit.
TEMPORARY RESIDENCE– Depending on the type of temporary residence permit held, the person may work in the territory of the Republic of Poland with or without a work permit. See below. FOREIGNERS EXEMPTED FROM THE OBLIGATION TO HAVE A WORKING PERMIT (the most common situations encountered in practice)
– holders of the Pole’s Card (+exemption from consular fees for acceptance and examination of an application for a national visa)
– spouses of PL citizens (if they hold a temporary residence permit due to marriage);
– full-time university or doctoral students at PL (the exemption does not apply to part-time students – extramural, evening, extension studies, etc.);
– graduates of Polish secondary schools, full-time university studies or full-time doctoral studies in Polish universities, research institutes of the Polish Academy of Sciences or research institutes operating in accordance with the regulations on research institutes
– persons having in the Republic of Poland: refugee status, subsidiary protection, permanent residence permit, long-term resident’s EU residence permit, humanitarian residence permit, permit for tolerated stay.
REFUGEE PROCEDURE – As a rule, an applicant under the refugee procedure is not entitled to work. However, if the procedure lasts longer than 6 months, after this period the applicant may receive a certificate entitling him/her to work until a final decision in the case is issued.
However, if you have applied for refugee status while holding (at the time of the application) a valid temporary residence and work permit, a registered statement on entrusting work to a foreigner, and a residence basis permitting you to perform work on this statement (see above), or you are authorized to perform work on another basis, e.g. a temporary residence and study permit, you may work legally for the period of validity of the basis from which your entitlement to work arises.