Following are main methods:

Water extraction: Coffee beans are soaked in water. The water, which contains many other compounds in addition to caffeine and contributes to the flavor of coffee, is then passed through activated charcoal, which removes the caffeine. The water can then be put back with the beans and evaporated dry, leaving decaffeinated coffee with its original flavor. Coffee manufacturers recover the caffeine and resell it for use in soft drinks and over-the-counter caffeine tablets. Supercritical carbon dioxide extraction: Supercritical carbon dioxide is an excellent nonpolar solvent for caffeine, and is safer than the organic solvents that are otherwise used. The extraction process is simple: CO2 is forced through the green coffee beans at temperatures above 31.1 °C and pressures above 73 atm. Under these conditions, CO2 is in a "supercritical" state: It has gaslike properties that allow it to penetrate deep into the beans but also liquid-like properties that dissolve 97–99% of the caffeine. The caffeine-laden CO2 is then sprayed with high-pressure water to remove the caffeine. The caffeine can then be isolated by charcoal adsorption (as above) or by distillation, recrystallization, or reverse osmosis. Extraction by organic solvents: Certain organic solvents such as ethyl acetate present much less health and environmental hazard than chlorinated and aromatic organic solvents used formerly. Another method is to use triglyceride oils obtained from spent coffee grounds. "Decaffeinated" coffees do in fact contain caffeine in many cases – some commercially available decaffeinated coffee products contain considerable levels.
Other sources include the leaves of yaupon holly, South American holly yerba mate, and Amazonian holly guayusa; and seeds from Amazonian maple guarana berries. Temperate climates around the world have produced unrelated caffeine-containing plants. Caffeine in plants acts as a natural pesticide: it can paralyze and kill predator insects feeding on the plant. High caffeine levels are found in coffee seedlings when they are developing foliage and lack mechanical protection. In addition, high caffeine levels are found in the surrounding soil of coffee seedlings, which inhibits seed germination of nearby coffee seedlings, thus giving seedlings with the highest caffeine levels fewer competitors for existing resources for survival. Caffeine is stored in tea leaves in two places. Firstly, in the cell vacuoles where it is complexed with polyphenols. This caffeine probably is released into the mouth parts of insects, to discourage herbivory. Secondly, around the vascular bundles, where it probably inhibits pathogenic fungi from entering and colonizing the vascular bundles. Caffeine in nectar may improve the reproductive success of the pollen producing plants by enhancing the reward memory of pollinators such as honey bees.The differing perceptions in the effects of ingesting beverages made from various plants containing caffeine could be explained by the fact that these beverages also contain varying mixtures of other methylxanthine alkaloids, including the cardiac stimulants theophylline and theobromine, and polyphenols that can form insoluble complexes with caffeine. Products
Products containing caffeine include coffee, tea, soft drinks ("colas"), energy drinks, other beverages, chocolate, caffeine tablets, other oral products, and inhalation products.