QT is continuously underated, mistreated and misunderstood in the hobby. Of course they're used for treating fish, if necessary, but their main purpose is to acclimate the fish to captivity, which includes getting used to human interaction, accepting prepared foods, etc.
Firstly, don't be discouraged by many experiences you'll read or hear about, horror story wise. Unfortunately many QT's are inadequate and set up in a rush, providing little hope for the new fish. Remember that the main reasons for QT are also overlooked... they should be used to acclimate fish to captivity including eating prepared foods, getting used to being around people, and also checking for any illnesses that can easily be treated for in QT. We are literally throwing new fish into battle with our existing, established fish that know when, what and how we feed, easily outcompeting even boisterous newcomers. QT period gives them a chance... we need to stop the "dump and hope" approach!
There are really two types of QT tanks you'll see, I like to label one as an "Acclimation QT" and the other as a "Hospital QT", although I run both in one Acclimation QT's will house live sand and live rock, generally with some algae growth on them for (certain) new fish to pick at, along with the hiding cover provided by the LR. They're generally used to get fish acclimated to captivity and taking prepared foods. Hospital QT's are generally bare bottom tanks with some PVC, eggcrate, other inert materials used for hiding (generally thought to not "suck up" as much meds). They're generally used to dose medications once they've been through the "acclimation" phase. Either needs to be equiped with a biological filter, many people use HOB or sponge filters (I prefer HOB, easy to maintain and can easily run carbon), a heater (preferably on a controller for redundancy) and in certain cases supplemental flow for oxygentaion (I rely on the HOB filter).
The MAIN killer in QT is Ammonia, particularly tanks that are run bare bottom with no llive rock. In those tanks WE literally are the filter, keeping a close eye on ammonia levels and doing water changes as necessary. Be prepared to do 100% water changes (if necessary) on QT at all times just in case.
Many people only run one or the other mentioned QT tanks, but really should be running both, or both in one as I do. Copper is a med often used in the QT stage that will be absorbed by LR and LS, and is a main reason people run the "hospital" style tank. I've seen (along with many others) that while using Seachem Cupramine, not only is it a very gentle copper med compared to others, it is not absorbed as much as other medications. After the first day of dosing it stabilizes fairly easy.
Make sure to have up to date test kits and meds while using either, and it's good to have beneficial vitamins, garlic enhancers, etc. on hand for the newcomers. I always have a Seachem "Ammo Alert" badge in the QT tank that tells me when Ammonia gets to an unsafe level.. They're cheap, effective, and last a year - I rarely if ever test for Ammonia in my QT anymore.
Don't plumb a QT tank into you main system, it defeats part of it's purpose in that pathogens get passed onto your existing animals. I use a simple shop light over the tank to grow algae on the rocks. If you plan to house coral in it you need more light of course, but then you cannot run copper in it either. If you QT fish and coral you really ought to run two seperate QT's... coral QT's can be very small.
Here's a pic of my QT (eggcrate top is put to use when fish are in the tank):
When all is said and done I also highly recommend a "social acclimation" period in which new fish are placed in an acrylic box (or similar) inside the display while letting the existing inhabitants see them and get used to their presence.