Man's G Spot

Ok so I had no idea this was a thing until my current bf started moving my hand toward his asshole and I was like I have no idea what's going on but whatever and went with it. Does anyone have any pointers on how to work their prostate on the outside and/or on the inside? And when should I do it? Just during foreplay and oral sex or also vaginal sex too? I'm so clueless