Toddlers explore their own and each others' genitals.
They call this game "playing doctor", probably since at the doctor they've had routine examinations of their private parts.
Adults use the phrase as a "cutesy" way to say "sex".
"Man you look tired!"
"Yeah Robin and I were up all night playing doctor."