Properties of the Quark Gluon Plasma, created in heavy ion collisions, can be studied by measuring production of various quarkonium states. Each state has a different binding energy and is expected to dissociate at a different temperature in the plasma. By comparing such a sequential suppression pattern to the model calculations, thermodynamical properties of the medium can be extracted. Cold nuclear matter effects however also play a role and can be studied in p+A or d+A collisions. Finally, quarkonium production in p+p collisions has to be measured in order to understand the quarkonium production mechanism.
In these proceedings, we present an overview of $J/\psi$ and $\varUpsilon$ production measured with the STAR experiment. Results from different colliding systems (p+p, p+Au, Au+Au and U+U) are discussed.