I bought a used note 5 from a guy on CL. He unlocked the phone and removed all lock codes. But when I was playing with the phone I noticed his gmail address was still on the phone. How do I remove his details and add mine?
As others have said, immediately do a factory reset. That will wipe his Google account and any other remaining apps/data on the phone. He should have done that before selling it - maybe he just tried to manually delete everything, which doesn't do the trick. Wipe it with a factory reset and start from scratch, adding your own stuff!
But only after you have replaced his gmail account with yours (as H3aTeRzz has explained above) or you may trip FRP (factory reset protection) which takes some doing to get around.
But only after you have replaced his gmail account with yours (as H3aTeRzz has explained above) or you may trip FRP (factory reset protection) which takes some doing to get around.