These two words have related but different meanings.
Leech and leach, as verbs, both describe taking a substance out of something—such as taking blood out of a body. Leech is originally the name of a snail-like creature that sucks blood out of animals. Ancient doctors tried to cure sickness using leeches. Now the word leech is more general, but carries the same idea:
Some doctors leech money out of people, not blood.
A person who lives off of other people’s money, food, or housing, is often called a leech:
Your cousin is such a leech; he just eats all our food and never gives back.
Leach, meanwhile, also means “to remove a substance”—but in a very specific way—by percolation. Percolation is the movement of liquid through loose substances, such as dirt or coffee. Sometimes percolating water leaches out (pulls out) substances that are mixed in with the dirt, etc.:
Toxic chemicals get into rivers and lakes when water leaches the chemicals out of the soil.
Water is not the only liquid that can leach—it’s just the most common example.