What's the difference between an underactuated system, and a nonholonomic system? I have read that "the car is a good example of a nonholonomic vehicle: it has only two controls, but its configuration space has dimension 3.". But I thought that an underactuated system was one where the number of actuators is less than the number of degrees of freedom. So are they the same?
They are different things. An underactuated system does mean that the number of independent control inputs is fewer than the number of degrees of freedom you are trying to command. This can happen for holonomic systems when they encounter a singularity, or for nonholonomic systems when they are commanded to move in a direction they cannot achieve. The state space method of looking at this is the controllability matrix, and in kinematics it is the rank of the Jacobian matrix, but you probably don't need to go into that level of detail to understand an underactuated system.
Nonholonomic means quite a different thing. A holonomic system can have its control kinematics expressed as geometric (including trigonometric) equations. A nonholonomic system, on the other hand, cannot be expressed as closed-form geometric equations. Instead, the best you can do is to write differential equations to express the kinematics.
Here's an example: think of a mobile robot with wheels. If you ask it to ascend to 10 meters in the air, it is underactuated. If you ask it to go to position (100 meters, 20 meters) from its current location, then the robot needs to turn its two drive wheels to get to the new position. Since it is a nonholonomic system, you cannot just count the number of rotations of each wheel to determine where it ended up, because the sequence of rotations matters, not just the total number of rotations (for example, it would end up in a different place if it actuated only the left wheel for so many rotations, then the right. as compared to if it actuated both wheels together for that many rotations). For a robot manipulator that is holonomic, you can locate it's end effector position by knowing the total number of degrees of rotation of each motor, and you don't need to care in what order the robot moved its axes.