A remedy is something that relieves or cures a problem or illness. Aloe vera is a common remedy for sunburn.
If you're having trouble sleeping, the first remedy you might try is a hot bath and a cup of chamomile tea. If that doesn't help, you may resort to something stronger, like a sedative. If a streetlight shining in your window is part of the problem, you can remedy the situation with some room-darkening shades. But if it's your upstairs neighbors and their all-night partying that's keeping you awake, you may have to consider a legal remedy.