Worsted is just a medium weight yarn. That's what the number '4' refers to. Other yarns that are thinner than worsted would have the numbers 3, 2, or 1 and heavier weight yarns would have a larger number on the symbol.
Different patterns call for different yarns and different needle sizes depending on what look you are after. A worsted weight yarn and a very large needle would give an open knit, whereas a worsted weight yarn and a very small needle would give you a very tight knit.