It will get contaminated if you're not very careful about sanitization. But, if you take extra precautions (such as spraying your work area with StarSan or Iodophor, flaming the lip of the yeast container, etc), you shouldn't have any problem.
How you harvest will depend on what you're fermenting in. But, the basic procedure is to transfer your beer to secondary, leaving a bit behind -- a pint or so is enough. Then swirl the fermenter to get the settled yeast back into suspension and pour it into a sanitized glass container. I use Erlenmeyer flasks, some people use glass canning jars, some use juice bottles, etc. Then cover the top of the container with several layers of aluminum foil -- I usually just take a big piece and fold it over twice. You can sanitize the foil if you like or just use it from the box (assuming the box hasn't been dragged though the dirt or something). Then put the yeast in the fridge -- make sure it doesn't freeze. If you use it within a week or so, you can just take it out, pour out the liquid on top, and pitch 300-400 ml (1.25-1.75 cups) and stand back! You'll see the best fermentation you have had!!!