That's pretty much the checkride in a nutshell - for all the details on what's expected you should refer to the FAA Practical Test Standards for the rating you're pursuing.
Before your checkride
At some point before your checkride you must take a "knowledge test" (the "written exam") - you must pass that exam in order to qualify to take the checkride (the "practical test").
The results of the knowledge test are good for 2 years.
You will also receive instruction from your CFI specifically for "checkride preparation" (you must have 3 hours of this instruction within the 60 days prior to taking your checkride).
The Oral Exam
The day of your checkride1 you'll probably spend at least as much time on the ground with the examiner than in the air. You'll start by going over your logbook with the examiner (do everyone a favor and bookmark all the things they'll need to see), and then you'll be given a thorough oral grilling2 by the examiner.
You'll be expected to know the V speeds for your aircraft, its useful load, fuel capacity (in gallons and hours), and to be able to intelligently answer some scenario based questions.
There will also probably be some scenario-based regulatory questions ("You're taking your friends for a flight in the spring, but you haven't been in an airplane all winter. What do you need in order to be able to conduct this flight?")
You will also be expected to plan (or have planned, depending on the examiner3) a cross-country flight (including a weight and balance calculation using the examiner's weight, and possibly including one or more fuel stops), and be able to explain your decision making process for things like the planned course (if you don't fly in an absolute straight line) and your selected altitude(s) and waypoint(s).
1 - Usually you do the oral exam, then go fly. Sometimes you may do the oral one day and the flight portion another day - for example if the weather is lousy.
2 - This video is a little old, but a lot of it is still valid.
3 - You used to have to complete the flight plan the day of the exam, within 30 minutes, but that requirement has vanished from the PTS.
The Flight Exam
Every examiner conducts this a little differently - the tasks can be done in any order as long as they're all accomplished - but everyone I know has had the same basic sequence of events on their checkride.
After the oral you're going to get an update to your weather briefing (because you should), do a preflight inspection, get in the plane, and go fly your cross-country.
I've never met anyone who has actually flown the whole flight - The examiner will typically have you fly through one or two waypoints to prove that you can actually navigate, then you'll be told that something has gone awry and you need to divert ("The guy in the back is sick, take me to the closest airport before he hurls.").
When you've demonstrated your ability to navigate and divert you'll usually cancel your flight plan (if you opened one) and break off to do the required air work.
At some point during your checkride you will almost certainly experience an engine failure, because aircraft engines are supremely unreliable whenever an examiner or CFI is in the right seat. You will be expected to pick a suitable landing point, establish a glide to that landing point, and run the "engine failure" checklist appropriate to your plane.
The engine usually "miraculously restarts" at some point once the examiner is sure you would have been able to put the plane down on your intended landing spot.
Once the air work is complete you'll return to the airport (or maybe to the airport you diverted to) for the dog-and-pony-show landings (one go-around - usually called by the examiner with something exciting like "There's a moose on the runway! Go around!", one normal landing, one short-field landing over an FAA-Standard 50-foot giraffe, and one soft-field landing).
If you mess up and the examiner has to fail you they will tell you immediately after finishing the maneuver that you busted on. You usually have the option of continuing the test and completing the remaining tasks unless you did something that made the examiner fear for his or her life (if you're comfortable continuing this reduces the number of tasks you'll have to complete when you re-take the checkride).
Assuming you don't screw any thing up too badly, scare the examiner, or hit anything taxiing back to the ramp you're a private pilot - the examiner will fill out the appropriate paperwork, sign your logbook, and issue you your temporary certificate.
Your specific questions that I didn't answer above
How long does it take?
My checkride took about 3-4 hours - about 1-2 hours for the logbook review & oral, just over an hour in the plane, and about an hour of "miscellaneous bits" (re-briefing the weather, the preflight, securing the plane after the practical portion of the test, completing the IACRA paperwork to make your new certificate/rating official).
How are emergencies created/tested?
The standard engine failure is usually created by pulling the throttle back. Your examiner may throw other curve balls at you (like handing you the foggles and saying "You just flew into a cloud, get us out of it."), or create random distractions ("dropping" their pen during climb-out appears to be a favorite from reading other people's checkride stories).
What's important isn't how the situations arise, but how you handle them. The examiner wants to see you fly the airplane safely, run the appropriate checklist(s), and handle the emergency in such a way that they're confident if it happened for real you'd be able to do the right thing.
Who makes sure the weather is suitable for flying?
You do! You are acting as Pilot In Command for your checkride, and you are expected to exercise sound judgment.
The examiner is not going to let you take off into a thunderstorm or gale-force winds (examiners have excellent self-preservation instincts. Most of them are or were flight instructors.), but if the examiner has to be the one to say "Yeah, I don't think we should fly in this weather" that's a guaranteed failure.
What if the checkride has to be cancelled for reasons not controlled by the student?
If you've already started (e.g. taken the oral, but can't do the flight portion because of weather, or the plane develops a mechanical problem) you'll receive a "notice of discontinuance" and reschedule the remainder of the exam.
Typically you can do this within 60 days, and you'll only have to do the portions of the exam you didn't do previously (though you can be re-tested on everything).
The same thing happens if you or the examiner have to cancel the exam for reasons not related to your aeronautical performance (that triple-breakfast-burrito on checkride day was NOT a good idea and you need to get back on the ground RIGHT NOW).
What else did I miss?
Probably a lot. I probably missed a lot too.
My checkride wasn't that long ago but I really don't remember much about it.