There are very limited exceptions, such as emancipation, which requires demonstrating to a court that the minor is self-supporting and can manage their own affairs. This is a difficult process and rarely granted.
In short, while a 17-year-old *might* physically move out, they would likely be doing so illegally and face legal repercussions, including the possibility of being returned home by authorities. The better course of action would be to explore other options, such as talking to a trusted adult, counselor, or social worker about their situation.