In theory, you drain the system, however it is easier and just as effective to simply unbolt the thermostat and let any coolant that wants to escape. (Only do this when the coolant is cold) When the old one is off, clean and dry up the mating sufaces you're going to use and make sure any old gasket is gone.
Then bolt up the new one. Either use a proper gasket or something like Hermatite red gasket compound which does a fine job.
Check all is done up tight afterwards.
To re-fill the system, simply fill the header tank up and wait for any bubble to stop. Squeezing the rad pipes helps.
When its stopped bubbling, run the engine with the header tank cap off and the heater on full. Also a good oportunity to check your new thermostat. The level will drop. Keep it topped up to the line. When the cooling fan has kicked in a few times and the heater is belting hot air into the car its all done. Replace the header tank cap.
When cool top up again and keep an eye on the level for a week or so. Movement of the car may well move some air bubbles.