In order to install a 3-prong outlet you MUST first be sure there is a good ground connection to the box in the wall. That could be from a bare copper ground lead in the cable, or from a solid conduit system all the way back to the breaker box (not likely), or from a BX cable (the ones with spiral-wound flexible steel covering over the wires) also properly connected to ground back at the breaker box. (Could be a fuse box, though, if you have 2-prong outlets.) At the breaker (fuse?) box there MUST be a ground point that is connected to a solid earth ground - a dedicated buried ground rod outside, or maybe just a heavy copper wire connected to the cold water line entering the house. Without the reliable ground all the way to the outlet box the 3-prong outlet is useless - it is NOT doing its job, but it fools you into thinking it is!
A GCFI is NOT a substitute for a proper ground. I will do only a part of the job.
On all 3-prong outlets I have seen there is an obvious green screw in the metal frame of the device - the same metal frame that mounts the device into the box with two screws top & bottom. IF you have a proper separate ground lead, it connects to this green screw. If not (if you're relying on conduit or BX cable which provides a ground to the BOX itself, then just mounting the device into the box is supposed to make the ground connection for you.
You MUST be sure the two power wires are connected to the right terminals on the outlet device. First you need to know which is which. On modern systems the wires in the cable are color-coded. They should always be black for "Hot" coming from the fuse or breaker, and White for "Neutral" coming from a common neutral bus in the breaker box. Most systems I have worked with are "Grounded Neutral" - that is, at the breaker box AND at the supply transformer outside the neutral line is grounded. (More on that in a minute). IF you are working with a Grounded Neutral system but the wire color coding is not clear, you can use this to test. Measure voltage from one wire to a true ground. The Neutral line should not have a measureable voltage on it; the Hot line will show 120 volts AC to Ground. WARNING: if both lines show voltage from a true Ground, you DO NOT have a "Grounded Neutral" system!
Now, take the new outlet device you plan to hook up. Turn it so that you are looking at the front of it as if you are ready to plug something in. Now turn it so that, on each half, the round Ground hole is at the bottom, and the two parallel flat slots are above that. There are screw terminals on each side for the power leads. The "Hot" (black) lead must go to the one on your right, and the "Neutral" (white) to your left.
Back at the breaker box, as I said, the Neutral bus will be grounded in a "Grounded Neutral" system. However, do NOT ever treat the Neutral bus or any white wires as Grounds!!! Because the white "Neutral" lines in each circuit are carrying the current back to the box, these lines have voltages on them in normal use and cannot be considered grounds points. A proper Ground (e.g., the bare wire in the cable) never has a current or voltage on it in normal operation. Under abnormal conditions (for example, a wire shorted out to the chassis in the appliance) it is required to carry a full load current safely to Ground with no interference. This will do two things: ensure the appliance case actually does not have a dangerous voltage on it to hurt you, and hopefully ensure that enough current is pulled that the breaker (or fuse) will blow out. Neither of these two protection systems can work if there is no true reliable Ground lead to the outlet box.