Activated carbon is prepared through two main steps: carbonization and activation. In the carbonization step, the raw material is heated in an inert atmosphere to remove volatile components. The activation step involves treating the carbonized material with oxidizing agents like steam or carbon dioxide at high temperatures to create a porous structure. This process significantly increases the surface area and porosity of the material.