Upvote:2
Although you don't say which country you are from, or where you want to travel to, the procedures are pretty much the same whatever the answer.
If by some chance you are in a country without a valid visa for it, then still apply for a new passport through your country's embassy, and then leave back to your home country and apply for a new visa there.