Yes. People who get treatment and stick with it can stop using drugs. They can change their lives so they don't go back to taking drugs. But they have to try hard and for a long time.
A person can make mistakes, feel bad, and start using drugs again. This is called a relapse. If that happens, the person should get back into treatment as quickly as possible. Relapse happens to a lot of people recovering from drug addiction.
Stopping drug use is like trying to diet and lose weight. It's hard to learn to do things differently, like eat less, exercise more, and avoid some favorite foods. It's easy to slip up, eat too much, and gain back the weight. But then you have to try again.
It's the same with quitting drugs. People with addictions might get treatment, slip up, and then go back to treatment many times before it works. It's important to get treatment for as long as you need it.