One commonly used rule in these matters is to use three colours.
• Primary colour: This is the main colour of the page. It will occupy most of the area and set the tone for the design as a whole.
• Secondary colour: This is the second colour on the page, and it is usually there to "back up" the primary colour. It is usually a colour that is pretty close to the primary colour.
• Highlight colour: This is a colour that is used to emphasise certain parts of the page. It is usually a colour which contrasts more with the primary and secondary colours, and as such, it should be used with moderation. It is common to use a complimentary or split-complimentary colour for this (see below).
By now you should recognise the colour wheel. If not, please read the section about Colour Theory. As mentioned there, the colour wheel is very useful when you want to combine colours in a way that is pleasing. Below I will demonstrate some of the most common ways to combine the colours in the colour wheel.
The analog colours are those colours which lie on either side of any given colour. Often these are colour schemes found in nature. A site that makes use of analogous colours usually feels harmonious. The secondary colour, as described above, can often be an analogous colour.
The complementary colours are the colours which are directly opposite from one another on the colour wheel. Complementary colours are contrasting and stand out against each other. Often it is a good idea to use a complementary colour as the highlight colour, as described above.
Split complementary is a colour and the analogous colours to its complement colour. Using split complementary colours can give you a design with a high degree of contrast, yet still not as extreme as a real complementary colour. It also results in greater harmony than the use of the direct complementary.
Triad colours are three hues equidistant on the colour wheel. When you want a design that is colourful and yet balanced, a triad colour scheme might be the way to go.
Keep in mind that the combinations above only illustrates the hues that are combined. In most colour schemes you will also introduce variations on saturation, tint and shade.
Besides the colour combinations described above, which are based on the position of the colours on the colour wheel, there are also a few other ways of combining colours.
A monotone colour scheme is just one single hue and its variations in terms of tints, shades and saturation. Using saturation and tint/shade variations of a colour is always good. However, in most cases I would advise against using a fully monochromatic scheme, as there is a risk of monotony. Using it with pure white or black can be efficient, though.
A monotone achromatic colour scheme is a special instance of the monotone scheme which consists of only neutral colours ranging from black to white. A scheme like this can beneficent, but it can very easily look boring. Using an achromatic scheme with just one bright colour for highlight can be very effective.