I’m writing a song for electric piano, bass, guitar, drums, and clarinet. The clarinet starts off as an accompanying instrument but later becomes the central melody. I am completely new to mixing and mastering and production in general. I want to make the clarinet in the melody more prevalent in the mix, but I worry that if I were to change the mixing so that the clarinet was louder and the other instruments were quieter, it would ruin the effect and the other instruments would sound awkwardly dampened. How would I overcome this? I plan to use a DAW like FL Studio or Ableton.
One thing that you will want to learn quickly in the DAW world is Automation. Automation allows you to control different aspects of your arrangement automatically via a mapping that you "draw" into the software. For example, you could have the gain increase on the clarinet track when it becomes the melody, either by having it jump up to the gain you want right when it becomes the melody, or gradually increasing it into that section. You can automate a whole lot of things in a good DAW, such as different settings on your effects.
One idea, which may or may not be valuable in this particular scenario, would be to automate a change in the EQ of the clarinet. If you boost the high end of the clarinet (just a little), it will have more presence in the mix without really increasing the overall perceived volume of the instrument. This is something that has been helpful for me in mixing bass, where there is a ceiling to how loud things can be in your DAW and if you want more presence in the bass (which I obviously do), you can't just raise the gain. You can raise the mids/highs though, and it will become more present in the mix as a result, while not really affecting the output levels of my low end.
The first thing is actually the way the clarinet is played. Horn players, when they play behind vocals, should play in quite a different way from soloing the melody line. Not only should they play quieter, the attack is often somewhat lighter, and the lines should be shaped to fit around and not get in the way of the melody. (It's called "playing fills".) If your clarinet player is doing this well, you may not have to make much adjustment.
Once that is in place, you should only need to make a few dB - 2 or 3 is ideal, I would say max of 6 or 8 - of volume change. As suggested above use automation to do this. You have to use taste and good judgement to figure out how much is just right and not too much. I typically have a go at it, make a rough mix, listen to it a few times over a day or two, and then tweak a bit.
OP, this is a very broad question, and there are countless techniques that could be used.
The best solution of course is to ask the musicians themselves to watch their dynamics. Hopefully this is self-explanatory.
The next best is to mic them differently to get the sound that you want. This will provide for a much better sound that trying to monkey with the dynamics in post. But you need experience to figure out what changes will have the effect you want.
One technique could include an additional mic just for the clarinet, which will give you better control over its dynamics because you can put it on a separate track. Just don't forget about the 3:1 rule.
Post production (mixing)
There are all kinds of techniques you can use in post. There is a lot to be said about each of these; my summaries only scratch the surface of things you can do.
Riding the fader. You can of course move the fader during the mixdown process. The old fashioned way is to move it manually, but many programs allow you record these movements and play them back, which provides for better consistency and allows you to ride several faders at once if needed.
Dynamics processing. The most basic of this is the compressor. You can use the compressor to reduce the overall dynamic range of the clarinet, which will allow you to increase its overall volume without making its peaks too hot.
Equalization. You can modify the equalization of the clarinet to bring it out, or modify the rest of the instruments to make a hole in the frequency range for it to come through. In general it is better to use the EQ to cut instead of to boost.
Pan. Instruments that are panned in the stereo space are easier to pick out; panning them together will tend to make them blend more.
Effects. If your recording is "dry" and you plan to add room ambience, you should add it after adjusting the dynamics of the mic so that they all sit in the same mix together cohesively.
Usually an engineer will combine several of the above techniques to get the overall mix to come out right. Don't be afraid to experiment-- that is how you learn-- and have fun with it!