When driver 1 is racing, and the next driver is spectating(driver 2). Driver 2 clicks on the "T" by the side of Driver 1 in the connections list (press N).
Then Driver 1 also presses the T to accept ( i think it'll be in green) and then when Driver 1 pits, once his pit stop has finished you'll be swapped over!
Setups and Skins won't be changed when you swap. Only the crash helmet design will. (iirc).
Hope you can make some kind of sense out of that