If you buy from multiple sources (online, other retailers, or fish from other hobbyists' tanks) then quarantine can be a very useful and efficient tool to ensure that your aquarium remains healthy. If you intend to keep more delicate and disease-prone species such as Discus or more delicate fish, then a quarantine period might be advisable, even if they are from your regular store.
If you have had a tank established without addition of livestock for an extended period of time (years or more), then it is definitely a good idea to quarantine any new animals. Your tank will have been isolated from many pathogens and your pets' immunity will have been shaped by the tank conditions. The addition of new fish brings new microbial challenges and your native initial population could suffer.
There are many different methods of quarantine and to list them all would take considerable time. The basics, however, are to isolate the new fish in a different tank then your main tanks BUT sharing the same water parameters. To do this, you need an appropriately-sized tank that is adequate for the needs of the new fish and a mature filter (or mature media that can be placed into a filter) suitable for the quarantine tank. A mature filter is a filter or media that has been established for some time and has a healthy amount of good bacteria to breakdown. Temperatures should be identical to the tank it will be going into or slightly higher to boost the immune system of the fish and speed up the life cycle of any parasites the new stock may be carrying. Provide shelter and hiding places if needed to ensure the comfort of any inhabitants and minimize any stress that can lower fishes' immune systems.
Fill the tank with as much mature water as you can spare from your main tank. Acclimate the newly purchased fish as you normally would, and then leave the fish in the quarantine tank for a period of 2 to 4 weeks. Feed as normal and perform water changes weekly. After the time has elapsed and assuming the fish have shown no signs of illness or disease, they can be introduced to their new tank.
While in quarantine, some fish keepers will treat their fish with medications or treatments to kill bacteria or parasites. While preventative treatment can be a good idea, always remember that any treatment given to an aquatic animal can be stressful if not properly or appropriately administered. Always follow the exact dosing directions of a particular medication as under dosing or over dosing may have adverse affects or delay the fish’s recovery.