Honestly, I've never sanitized my water heater...maybe I should, but I've never thought about it. To answer your question, it works just like one on your house. It's got a cold water inlet that comes from city water or your freshwater tank (both lines are connected at some point) and a hot water outlet that goes to the rest of the faucets. Most trailers will have a bypass setup right at the water heater so you can isolate it.
I will generally just mix a bleach solution (can't remember the concentration off hand) and pour that into the freshwater tank then fill it up. Then run the water pump out all the faucets until you smell bleach. Let it sit for most of the day, then drain the tank and fill it twice, run all the faucets until the bleach smell is gone, then drain it again. I've always bypassed the water heater during this.
2012 Chevy Tahoe LTZ - HD tow package
2017 Rockwood 2703WS Emerald Edition