score:2
what is the correct procedure to apply for a visa?
Details depend on the country in question, but the general procedure for visas holds: you submit an application at the consulate or embassy of the country whose visa you want. If you live in Poland and want a German visa, you start by finding a German consulate in Poland, perhaps the consular section of the German embassy in Warsaw.
How do you identify yourself in the current EU country after you have submitted your passport with all the required documents for the visa application and are waiting for a decision?
The details will depend on the country of residence, but most country's legal systems will recognize at some level that applying for a visa is a situation in which a foreigner may temporarily be unable to comply with identification requirements.
Some countries will issue a second passport to people who make frequent visa applications, so if the visa applicant is a citizen of such a country, it might be possible to avoid being without a passport.