Carbon Canister (aka Charcoal Canister, Vapor Canister)
The activated charcoal inside the canister absorbs gasoline vapor from the fuel tank (& in certain applications, crankcase vapors) until the CANP (canister purge) valve or VMV (vapor management valve) opens, allowing manifold vacuum to pull fresh air in thru the dust cap, collecting the stored vapors, & drawing them into the engine to be burned.
Any leak in the vacuum lines to or from the canister will result in dirty air entering the intake manifold, and possibly water or other contaminants.
The Fuel Tank Vapor System -
Gasoline is extremely volatile in almost all environments, and even diesel is aromatic. Since these vapors can be flammable or noxious, they must be contained & routed to the engine to be burned. But they are produced even when the vehicle is unused for long periods, so a simple tube from the fuel tank to the engine would still allow them to vent out the air filter. Also, during hot weather or violent maneuvers, the quantity of vapor generated can exceed the engine's capacity at low RPM, so the vapors must be stored & their flow regulated.
The system begins in the fuel tank where one or more valves are used to vent vapor pressure, but also to exclude liquid from the vapor system due to overfilling, slosh, or rollover. There may also be a pressure sensor to monitor the system's operation & effectiveness, and/or a vent valve (CANV solenoid, or built into the cap) to allow fresh air INTO the fuel tank or vapor system. As vapor exits the tank, it flows thru a tube to a canister containing carbon (activated charcoal), which absorbs the fuel vapor, but allows air to pass. Depending on the size of the fuel tank, there may be several canisters, or a single larger canister. Older canisters are vented, but they're known to collect water, so most modern canisters are sealed. Another tube leads from the canister toward the engine's intake, but it may contain a regulator valve (CANP solenoid, or VMV). The vapor system may also combine with the PCV system at this point.
Being virtually a zero-maintenance system, most faults are simple valve failures, hose leaks, or mechanical damage (collision, road debris, etc.).
Faults in the evaporative systems are usually detected by the use of a special machine which pumps a non-toxic non-flammable high-visibility smoke into the vapor lines to make leaks evident. But a common source of evaporative codes on '97-04 vehicles is the operator not securing the fuel filler cap. Earlier vehicles didn't detect this, and later vehicles are designed to exclude this from turning on the CEL.
Before madly ripping out all the emissions system systems on your vehicle, read this article