If you need to heat your carboy to maintain a constant temperature one of the most effective ways of doing this is to use an electric fermentation heater (40535) along with a digital temperature controller (40090). This system allows you to set a specific temperature and will control the heat source to maintain that temperature. The heaters can be used by themselves but you will need to monitor the temperature quite often and control the heat yourself. You can also submerge the carboy in tub with water and use an aquarium-type heater to maintain temperatures.
If you only need to raise the temperature a few degrees there are some relatively simple solutions to achieve this. The easiest is to wrap the fermenter with something like a sleeping bag or insulated blanket and use the heat naturally generated by actively-fermenting yeast to raise the temperature. You can also place the fermenter in a cardboard box or insulated chamber for similar results.
If you need to cool your fermenter you can use a dedicated refrigerator or freezer along with the digital temperature controller or analog refrigerator thermostat. The temperature controller overrides the refrigerator or freezer thermostat and controls when the unit is turned on and off. This could also be used in conjunction with an air conditioner.
There are also some tricks if you only need to lower the temperature by a few degrees. The easiest method is to wrap the fermenter with a wet towel. When the water evaporates it will cool the exterior of the fermenter. If this doesn’t quite do the trick you can place the fermenter in about 1-2 inches of water and wrap a wet towel around it making sure the towel is touching the water. This will continually supply water for evaporation. You can also add ice to the water or turn a fan on it to cool it even further. You can also submerge the carboy in tub with water and use cold ice packs to bring the temperature down. You will need to periodically change out the ice packs to maintain a consistent temperature.