There truly isn't a rule when to use compression or eq and when not to. You really have to figure that out for yourself. There are plenty of tutorials about eqing and compression. Watch some and try to apply what you learn. It takes some time and work until you instictively now when to boost a frequency, when to cut a frequency and when and how to compress a signal.
Having said that, there are signals/instruments that almost always get compression and eq: vocals, drums and basses almost always get compressed and eqed. But then again, there's no rule how much compression and eqing you apply. Are your drums already processed samples? Then all you might want to do is adding some compression on the drum group to "glue" your drums. Is your arrangement full of instruments, then you might want to create some space with subtractive eqing (attenuating frequencies), so the instruments don't stand in each others way.
It's a complex subject, but don't let that turn you down. We all had to figure out by trial and error, learning some trick here and there, and then try again. Immerse yourself into it. Start playing around with eqs and compressors (and any other plugins) and listen to how they change the audio. When you have a finished or half finished mix, ask for feedback here in the forum. That way you'll learn even faster.