Somehow, the drain pipe has completely separated from the bathroom sink. How do I fix this and what tools and materials do I need? Thank you in advance.
Here is a Project Guide for replacing a drain pipe. It includes step by step instructions along with the tools you need. Teflon tape is a good idea to put on treads as well.
This should help you out if not send a email with more details and i will try to assist further.
Here is a picture of a lavatory sink drain. They all install pretty much the same way.
Part (A), the flange, comes up out of the sink bowl as it has female threads that screw it in to part (B), the main body.
If your drain has come apart from the sink, somehow this has unscrewed.
More likely though, notice that the bottom end of the pipe from Adam444's illustration simply slips into the trap using a nut and washer. If this has come apart then slip it back into place and tighten the slip nut. You can use a pair of Channel Lock type pliers to do the final snug up. A new washer won't hurt and is cheap insurance, but no other parts should be necessary.
If indeed the sink flange has come apart from the drain, then take the rest of it apart and reinstall as follows:
Disconnect the lever and rod assembly (D) and turn nut (C) down closer to where the rod enters the drain.
Apply plumber's putty to the underside of flange (A) and set it back in place in the bottom of the sink bowl.
Screw in the drain assembly from underneath into the sink flange, and line up the rod inlet to the back of the sink as you tighten it down by hand. Once snug then tighten nut (C) with its washer snugly to the underside of the sink with pliers.
Reinstall the rod assembly and gently tighten its nut by hand to apply only a small amount of tension to the rod ball.