To "file for" a divorce means to submit the legal paperwork that's needed to get divorced.
There are other legal situations that you have to "file for". Many of these situations have specialized legal names that you don't need to remember unless you're going to be a lawyer. But some common ones are:
- file for bankruptcy
- file for unemployment ("unemployment benefits" are money you get from the government when you don't have a job)
- file for a patent (a protection for the person who invents something new, so that other people can't copy it and sell it)