According to http://www.electronicspoint.com/threads/bump-n-go-robot-help.64701/ :
"These kind of toys usually have a simple mechanism driven by a single
motor, it's not easy to describe tho. Usually, a vertical motor drives a
pair of wheels in a free turning cage. It's a kind of differential -
imagine the solid back axle of an old car with the prop shaft vertical.
The whole toy balances on these wheels, stabilised by a couple of
protrusions on the underside of the toy. Because of the design of the
bottom of the toy, when there`s little resistance, the robot moves
forwards, but if it is stopped by an obstacle, the resistance on the
wheels causes the the cage to be spun by the motor, thus steering the
toy in a different direction - Imagine how a dodgem (bumper) car works
except the steering wheel is turned by the motor when the driving wheels
EDIT (11/11/2014): OP added some information in the comments, so, not being able to inspect the toy, let me hypothesize. Probably, the toy's behavior can be implemented in several ways. For example, the following is possible. For example, the motor can drive (rotate) both the wheels and the cage via gears, but not simultaneously (for example, if the gears have shallow teeth, and when the gear driving the wheels is engaged, the gear driving the cage is not, and vice versa). Far from obstacles, wheel rotation is unimpeded, so they rotate, and the cage does not (as the relevant gear is disengaged). Furthermore, cage is impeded by friction between the wheels and the floor. When the toy bumps into an obstacle, the wheels are impeded (the resistance to wheel rotation is greater than resistance to cage rotation), so the wheel driving gear disengages and the cage driving gear engages. This mechanism also explains why "when the toy is lifted off the ground it's the cage that spins, not the wheels" - the cage rotation is not impeded by friction between the wheels and the floor.