For kegging homebrew, I prefer using 5 gallon Cornelius kegs. They come in two styles, Pin Lock and Ball Lock. Both operate the same way and serve the same purpose, but it’s important to remember that there are different fittings (Ball Lock here, and Pin Lock here) that you’ll need to buy assemble your connection lines for adding CO2 and for serving.
When your beer is finished, if you have the ability to ‘cold crash’ your beer for at least 24 hours, I highly recommend it. It settles much of the yeast onto the bottom, and cools the liquid for faster CO2 absorption (though the left-behind yeast contribute to carbonation as well) .
Once the beer is ready, move it onto a bench or something above the keg you’re draining into. You’ll be using a siphon and gravity to transfer your beer. It’s important to remember to be as sanitary as possible, and minimize exposure to oxygen as much as possible. (I’m using saran wrap here to cover the top of the fermentor and the keg)
Here I am ‘racking’ an IPA into a keg. I use a piece of silicone tubing that I boiled, and placed into the beer carboy close to the bottom (above the yeast cake). I then use a pump or another siphon method to draw the beer up into the line. I clamp the line, and sanitize the end of it again before opening the keg and dropping the line it. Another option for this step is this handy device from Morebeer. You can blow into the end, which will start the siphon into your keg.
Once the keg is full (close to the baffle at the top), remove the tubing, sanitize your keg cap, and replace it. Connect your CO2 bottle to the keg, and add 30 PSI. It is important to fill with CO2 and purge using the pressure relief valve on the keg at least three times to remove the oxygen in the headspace of the keg.