National Electric Code
The National Electric Code (NEC) approved in 1996 requires the use of four-wire cords and receptacles for connecting 240-volt appliances. This includes dryers, electric ranges, wall-mounted ovens and cooktops.
Older 240-volt receptacles and plugs have three wires, which include two hots to carry the power and one neutral. The new code requires the 240 outlet to use a 4-prong/4-wire plug that includes an extra wire to ground the appliance.
The additional grounding wire protects from possible shocks that could travel through the appliance to the user. The ground wire allows an alternative path for electricity to follow if something goes wrong. Using the building's electrical system, errant electricity is sent into the earth.
Because they are "grandfathered" in, the older 3-prong outlet/plugs are still approved for use if they are already installed. However, upgrading them with the new 4-wire system is required if they are changed or replaced. Plugs on older appliances can be replaced with the grounded wiring or plug so that they can still be used in newer construction.
Have a licensed electrician do the work so that it is done properly. Also, do not try to change from 4-wire to the 3-wire since that would eliminate the protections from shock that the ground wire provides.