Yes; someone may need to correct me since it has been awhile since I've done it but:
The driver waiting will press the little 't' next to the driver he is teamed with before the pitstop happens. The current driver also needs to press the t or do something before / during the pit. Then after/during the pitstop the drivers are swapped.
The first driver will want to be sure to put the car into neutral, otherwise it will stall when he gets out.