Lye is a caustic alkali commonly used in cleaning products. Typically it refers to sodium hydroxide, but it can also be used to describe potassium hydroxide. Both chemicals are hazardous to handle.
Less caustic forms of lye are used around the world in various culinary traditions, from curing, to canning, to baking. The kinds used in cleaning, however, are very dangerous to consume, and working with them requires caution.
Water poured onto lye, for example, can cause a messy chemical reaction that can lead to severe injury if inhaled or brought into contact with skin. Consuming lye can be very dangerous, even fatal.
Lye also has a strong reaction with several metals—it can form hydrogen, which is flammable, with aluminum, brass, bronze, chromium, magnesium, tin, and zinc, and can corrode copper surfaces.
Lye has been in use as a cleaning agent for thousands of years, and may have been discovered when the ashes from an ancient cooking fire ran into a nearby body of water, where the animal fats and burned wood combined to form soapy suds.