Enzymes are proteins that catalyze or speed up specific chemical reactions so they go faster than they would without the catalyst. Some enzymes require the presence of an additional molecule or metal ion called a cofactor before they can work their magic. Without this cofactor, the enzyme is no longer able to catalyze the reaction.
By definition, a cofactor is a nonprotein ion or molecule required by the enzyme for its function. If the cofactor is removed, the enzyme will not be able to do its job and will no longer work as a catalyst. Your blood, for example, contains an enzyme called carbonic anhydrase which catalyzes the reaction between water and carbon dioxide to form carbonic acid. Carbonic anhydrase requires a zinc ion as a cofactor. If no zinc is present, the enzyme will not work.
Cofactors may be positively charged metal ions, such as iron, magnesium and zinc, or they may be small carbon-based molecules like vitamin B12. Small molecule cofactors are sometimes called coenzymes. Many of the vitamins you need in your diet act as enzyme cofactors or precursors to enzyme cofactors. Some enzymes bind their cofactors very tightly so that the cofactor is basically part of the enzyme; in these cases the cofactor is sometimes called a prosthetic group. For other enzymes, the cofactor is only loosely bound or connected.
The precise role that a cofactor plays in an enzymatic reaction depends on the enzyme. Each enzyme has its own reaction mechanism, a sequence of chemical steps through which the reaction it catalyzes takes place, and the role of the cofactor is specific to that mechanism. With carbonic anhydrase, for example, the zinc ion is stuck in a cleft in the protein called the active site. Since it's positively charged and electron-poor, it can form a bond with a passing water molecule, enabling the water molecule to lose a hydrogen ion so that it becomes a hydroxide ion, OH-. This hydroxide ion can now attack the carbon atom in a molecule of carbon dioxide to form carbonic acid. By binding the water molecule and enabling it to lose a hydrogen ion, the zinc ion has helped the enzyme facilitate the reaction.
Depriving an enzyme of its cofactor is sometimes a good way to stop the enzyme from catalyzing an unwanted reaction. When students or scientists are extracting DNA, for example, they want to ensure that the DNA is not chopped up by enzymes called DNAses. Adding EDTA to the reaction mixture prevents DNAses from working because the EDTA grabs onto magnesium ions and binds them in the solution; magnesium is a cofactor that DNAses require in order to function.