Please don't listen to people who say things like "I just wash my ass in the shower and I'm good" they are either very unique one in a million individuals or liars. We actually need MORE sex education for gay men, not people pretending an ass is no different to a vagina. FEACES comes out of your asshole, sorry to dampen the mood, but that's a fact of life. So if you want to have anal sex and have a fun, confident time, you need to CLEAN inside and out before hand.
Most people do that with a douche. There are various types from ones that fit on to the shower hose to squeezy bulb ones. You fill your ass (not too much) with like warm (not hot) water and hold it for a short while, then shit it out over the toilet. Repeat this a few times until the water runs clean, then allow your system to relax and settle, maybe in 30 minutes you'll get a feeling that you might need to do it again, or maybe everything will be fine - listen to your body. So you want to do this an hour or two maybe before any sexual activity. Also it''s common sense not to eat certain foods the day before - like don't eat a big spicy meal the night before. I know it takes some of the spontaneity away, but real life isn't a fantasy porn scene unfortunately, so we must prepare in advance.
This is a pretty famous infographic guide with good tips, I don't know this website, it's just the first one I found on google that linked to the infographic, you might have seen it before on tumblr sites and such. 
https://insidejamarifox.com/how-to-avoid-shitty-situations-the-complete-guide-to-a-clean-tail/