The nail is history. It will not reattach. For now, keeping it covered and protected is the right thing to do. A new nail will grow and gradually push off the remaining attachment of the old nail. If the pain is still there and you are concerned, you can see a doctor. I can't say how often a family doctor treats this, but podiatrists see this frequently.