Just like that of a manual transmission, the automatic transmission's primary job is to allow the engine to operate in its narrow range of speeds while providing a wide range of output speeds.
Without a transmission, cars would be limited to one gear ratio, and that ratio would have to be selected to allow the car to travel at the desired top speed. If you wanted a top speed of 80 mph, then the gear ratio would be similar to third gear in most manual transmission cars.
You've probably never tried driving a manual transmission car using only third gear. If you did, you'd quickly find out that you had almost no acceleration when starting out, and at high speeds, the engine would be screaming along near the red-line. A car like this would wear out very quickly and would be nearly undriveable.
So the transmission uses gears to make more effective use of the engine's torque, and to keep the engine operating at an appropriate speed. When towing or hauling heavy objects, your vehicle's transmission can get hot enough to burn up the transmission fluid. In order to protect the transmission from serious damage, drivers who tow should buy vehicles equipped with transmission coolers.
The key difference between a manual and an automatic transmission is that the manual transmission locks and unlocks different sets of gears to the output shaft to achieve the various gear ratios, while in an automatic transmission, the same set of gears produces all of the different gear ratios. The planetary gearset is the device that makes this possible in an automatic transmission.