Depending on what you're going through, medications can help keep the mind and body in a state of balance.
The mind, just like the body, likes to be in a state of equilibrium known as "homeostasis." Sometimes stressful, difficult, or challenging life events can cause this state to be unbalanced.
Many times one has learned skills throughout their life that can help bring their mental and physical states into balance. Other times, it can be too difficult to do on one's own and something else is needed.
Medications can help bring one back to that equilibrium state. One does not necessarily need to be on the medication forever. But it may be needed for the challenges you're going through.