Paints in general
It's better to buy a few tubes of good quality paint rather than a lot of poor stuff that you may never use.
Quality in paints has to do with the pigments -- that is, the chemical compounds that give the paints their hue or colour (e.g. Cadmium Red, Cobalt Blue). In "Student's quality" paints the pigments are mixed with filler to make them cheaper, and they may also contain pigment substitutes rather than the true pigment. "Artist's quality" paints have more pure pigment but are more expensive.
Some pigments fade when exposed to light. Pigments which fade are known as "fugitive", and those which don't fade are known as "permanent". Permanence is a property of the pigment itself and the better brands display the permanence rating on the label. In some brands this is "A" to "D", with "A" being the most permanent. Other brands use stars, with four stars being the most permanent. Ratings less than "B" or less than three stars are considered fugitive. It's best not to use fugitive colours because the painting will fade.
If the paint label says "PIGMENT (HUE)" (e.g. Cobalt Blue (Hue), this means that this paint is not made with the true pigment but with a substitute which approximates to the pigment. There are no guarantees with substitutes; often they don't carry ratings.
Pigments made from organic dyes tend to be fugitive, while the earth colours are the most permanent (umbers and ochres).
What colours to buy?
A minimum set of colours would be:
The red, yellow and blue in this list are reasonably close to the primaries and with this set most other colours can be made. These colours can be obtained in any medium.
Black is controversial but is widely used by contemporary painters.
You will notice there's no green in this list. That's because tube greens tend to be fugitive, although Pthalo Green is an exception. Greens are readily mixed from blues and yellows.
A starter set of paints
Sometimes you can get good bargains on starter kits which will contain most of the basic colours and some extras.
If you would prefer to buy them separately, below is a good basic set in any medium -- oils or acrylics or gouache or watercolour.
Alizarin Crimson is a borderline pigment. Sometimes it's listed as three stars, sometimes two.
Optional additional colours: