Let's say you are an international student from India studying in the USA and you lost your passport. You had Chinese, Russian, German, and of course, the US student visa on the lost passport. You only need the US visa on your new passport, so does the consulate/embassy dig up your "visa history" when issuing the new passport?
The steps are as follows:
- File a police report for your lost passport.
- Take this police report to your country of nationality (or the country that issued the passport if you are dual national). They will generally give you a replacement document. This may either be a normal passport, an emergency travel document, or a special travel passport that allows you entry into the home country.
Now, as you are in the US - your I-94 and I-20 prove your legitimate entry; and on exit there are no immigration formalities - so you are safe there.
On return you'll have to re-apply for your visas and explain that your passport was reported lost (this is where the police report comes in handy). You may then have to provide additional documents and be granted a new stamp on your passport.
The validity will probably remain the same as your old visa - so make sure your current passport meets the requirements for the visas you are trying to re-apply for.
In other words, if your old passport was valid till 2020 and you new one is temporary and only valid till March 2018; if a visa was valid till May 2018 it probably won't get stamped onto your replacement passport.