Why would the light switch control the fan and the fan switch control the light?
You've likely just swapped a couple wires, if you even have to do anything. If the fan and light are controlled by simple snap switches, then you don't really have to do anything (other than relearn which switch is which). If you have specialty fan controls and/or dimmers, you'll want to switch things around.

In the ceiling box above the fan, there should be a wire connected to the blue wire of the fan, and the black wire of the fan. You'll simply want to swap these wires. So take the wire that is connected to the blue fan wire, and attach it instead to the black fan wire. Then take the wire that was attached to the black fan wire, and connect it to the blue fan wire.

If the wiring is more complicated than I've described (or a remote module is used), please post some photos of the wiring before proceeding.