Curiosity is controlled from earth in a sense. Back at earth, the Rover Planners examine photos taken from Odyssey (the orbiting mars mapping probe / signal relay satellite,) and from the rover itself. A 3D "mesh" (kind of like a level in a 3D game) is generated, and the basic course is plotted and "sequenced." Once a sequence has been generated, it's rechecked, compiled, and transmitted to the rover. Sequences cover everything from driving, photographing, use of the AXPS and other scientific equipment.
The rover does have some autonomy. If they tell it to basically "go over here," it'll do it's best, but will use several instruments to determing tilt, slippage, and any other hazardous conditions it may run into. If it finds something it doesn't know how to get around, it'll stop and contact Odyssey (which will then relay the rover's current status back to Earth, hopefully so the RP's can figure out how the hell to get it out of whatever fix it's in.)
The same basic software / strategies were used to great success for both Spirit and Opportunity, which both lasted far beyond their 90 sol assumed design limits.
(Opportunity is actually still functioning, and is currently studying what looks to be evidence of ancient seas on the other side of the planet, )