A vitamin K shot is given just after birth, while the Hepatitis B vaccine is usually given prior to leaving the hospital.
Your baby will get a vitamin K shot just after birth in order to prevent a condition called hemorrhagic disease of the newborn. Our digestive systems produce vitamin K, which is vital in blood clotting correctly. Newborns lack vitamin K in their guts and are at risk for bleeding.
The first vaccine that is given is the Hepatitis B vaccine. Some hospitals and birthing centers give it prior to leaving, and some depend on your pediatrician to give it at the first visit after going home. Ask ahead of time to know what is standard where you plan to deliver.