I cut my foot an a nail. What do I need to do?

See a doctor. Depending on the size and depth of the cut, it needs to be cleaned and possibly sutured. Need to check your tetnus history, need to check for any infection.
See md. If you have not had tetanus shot in over 5 years you need to see md. Otherwise immediately soak foot in clean soapy water and cover until you see primary for tetanus shot. If swelling occurs you will need antibiotics to prevent or treat infection.