If the nail came off because of an injury, the exposed nail bed should be kept dry and bandaged while waiting for a new nail to start growing to reduce the chance of infection. If the nail came off because of an infection, you should see a doctor to determine what treatment to pursue.