The best method of cleaning the main drainage pipe is through mechanical and not chemical means. The use of chemicals, such as sodium hydroxide (lye) is both dangerous to the swimmer and detrimental to the pool equipment. A mechanical device such as a snake is the most effective and safest method to unclog the pipe.
It's kind of a long, detailed process but the overview is a simple idea. Close off the skimmer(s) and use your regular garden hose with a special attachment (pool store) to flush the main drain. Lots of junk will come back up and you'll have to vac the pool.