Activated carbon is created by treating carbon-rich materials, such as wood, coal, or coconut shells, with heat or chemicals to create a highly porous material. These pores provide a large surface area for contaminants to adhere to. When air or water passes through the activated carbon, pollutants are trapped in the pores, effectively removing them from the medium.