Okay kiddo, so Atascadero State Hospital is a place where people with mental illnesses go when they need help. And Scanlon was a man who was sent there because he was accused of doing something bad.
Now, Scanlon didn't like being at the hospital, and he wanted to leave. So he asked the people in charge if he could go home. But they said no, because they thought he needed more treatment to get better.
Scanlon didn't like that answer, so he went to court to argue that he had a right to leave the hospital if he wanted to. The court had to decide if Scanlon's right to leave the hospital was more important than the hospital's responsibility to keep him safe and help him get better.
In the end, the court decided that the hospital had the right to keep Scanlon there, because they thought he needed more help. But they also said that Scanlon had the right to go back to court and argue again if he thought he was ready to leave.
So it's kind of like when Mom and Dad tell you that you have to go to bed, even if you don't want to. They're doing it because they think it's what's best for you, even if it's not what you want.