One is using the standard airlock sold at homebrew stores. A hole is made in the lid of the fermenter and a rubber grommet in inserted. The airlock fits in the grommet. Pretty easy
The next is the blow off method. This is running a tube through the hole in the lid into a small jar partially filled with water. It will fill up some more as foam and some beer are blown out of the tube. It is just a different type of air lock. Some people like this method as they claim some of the bitter resins from the hops are blown out.
Now my boss says that back in his Navy days on submarines they used a rubber glove. This allowed the gas somewhere to go, causing the glove to swell, with out the worry of the smell clueing in his superiors that something was going on. I personally haven't tried this method but it should work. This just in my sister-in-law says she has used a balloon in some of here own clandestine wine making. There we go, independent confirmation.