Remove the tank from the bike, then the petcock from the tank. Depending on how dirty the tank is, you may simply need to flush with water. If necessary, I sometimes add a squirt of engine degreaser, and flush again with clean water. I then take my time to remove all water from the tank using a wet / dry shop vacuum.
Depends on how bad it is inside. Lots of vids on You Tube showing how to & what to use, depending on if it's just old gunk & bad gas or if it's rusted inside.
If you're referring to flushing out a bad liner... Do... Not... Bother. Just went through this and tried every suggestion on the forum. Get another tank on eBay if your liner is bad