Organic frameworks function as catalysts by providing an active surface where reactants can adsorb, react, and then desorb as products. Their high surface area, porosity, and customizable active sites allow for efficient catalytic processes. The metal ions or clusters in MOFs, or the organic linkers in COFs, can act as active sites for different types of reactions.