The green wire is the ground wire, and it is the difference between a three-wire and a four-wire cord. (In the three-wire system, the ground wire and the neutral wire are the same.) The green wire connects to the dryer frame. Look at the cord-connection terminals on the back of the dryer. Very close by, you should see a screw sticking out of the metal panel. It will be labeled "external ground connector" or something similar. Connect the green wire to that screw.
Most appliances in your house run on 120 volts of electricity, some on 240 volts. The dryer needs both--240 volts to run the drum and heating element, and 120 volts to run the timer, thermostat and other components. For this reason, the dryer cord has two live or "hot" wires--one black, one red--rather than a single hot wire. The dryer draws 120 volts from each hot wire to get the 240 volts it needs for the heavy work, then pairs one hot wire with the neutral wire for the 120 volts to run the smaller functions. Look again at the connection terminals on the back of the dryer. There should be three screws in a horizontal row. Connect the black hot wire to the terminal on the left.
Connect the other hot wire, the red wire, to the terminal on the right. (In truth, you could connect either hot wire to either hot terminal, but it's standard procedure to put the black on the left and the red on the right, so do so.)
The white is the neutral wire, and it connects to the center terminal. There may be a metal strap attached to this terminal. That's a ground strap. When a three-wire cord is attached, it serves the same function as the ground screw mentioned above.
If you have a three-wire cord, then all three wires will be gray. They're arranged side-by-side with the hot wires on the outside and the neutral wire in the middle. Attach the hot wires to the left and right terminals and the neutral wire to the center terminal. Make sure the ground strap is attached to the center terminal.