Currently I have a switch that turns the light on and off, and a second switch that turns the fan on and off. I would like to make it so the fan can only turn on if the light is on as well. But if the light switch turns off so does the fan. Now I don't want one switch to turn them both on and off together. I just don't see a need to leave the fan on if you're not in the bathroom. Hopefully I've asked my question in a way you understand what I'm asking.
To do what you ask:
Disconnect the supply for the fan switch - wire-nut and tape it (it will be going no-where.)
If it's a jumper from the light switch supply, just remove the jumper. If the light switch is supplied by a jumper from the fan, remove the jumper and move the supply to the light switch.
Put a pigtail on the light switch switched hot, and connect the light (which was connected to the switched hot), and the supply for the fan switch to that pigtail.
... but my comment is probably a better approach to take.