It's called "conversion therapy" It's a pseudo scientific practice that uses high pressure psychological techniques to try to turn gay people into straight ones.
Some call it "pray away the gay" because of the many religious fanatics who spend their time trying to "save" LGBT people from themselves.
But in most cases what it amounts to is nothing less than child torture.
A recent Hollywood movie called Boy Erased, is based on a true story, and makes that only too clear.