'Work out' is a common English idiom and phrasal verb with diverse and unpredictable meanings.
1. On its own, 'work out' most often refers to exercise, particularly exercise that is done primarily for reasons of health or fitness rather than directly for pleasure. This meaning also has a noun form, workout.
2. It is common to use 'work out' to refer to solving a problem, either a technical problem (e.g., a math problem) or a social one (e.g. find a compromise). It carries the subtext that the problem was not an easy one to solve. When used in this sense, 'work out' is a separable verb and is often formulated "work it out".
3. It also means to decide, as in "It is difficult to work out what is art and what is not" or "I need to work out who I am". Again, this can be a separable verb, and the phrase "work it out" may also refer to this meaning.
4. And finally, it can mean turn out okay, as in "it will all work out in the end". Although it is less common, this form can also be separable, as in "it will all work itself out in the end".
These four meanings are all in common usage and it can be difficult for non-English-speakers to figure out which one is meant in rapid conversation; as a rule of thumb, 'work out' means "fix" or "exercise" depending on context. One fun wrinkle of English is that 'work out' is almost always a phrasal verb, but sometimes it is just a perfectly valid noun + preposition construct, as in "let's get our work out of the way first".