Adding highlights and shadows to an object helps give a feeling of three-dimensions to it. The first thing you need to do is to decide which direction the light is shining from. This needs to be the same on every item in the painting. Highlights are added on the side the light is coming from and shadows on the opposite.
In the example of a green apple below, the light is coming from the right-hand side, at about two o'clock. So the highlight will be on the top, right of the apple, and the shadow at the bottom, left.
Adding a highlight: Highlights occur where bright light hits an object and are usually quite small. Don't use pure white to create a highlight, but rather a very pale shade of the colour of the object. Pure white will generally appear too harsh or artificial. So in the case of this green apple, use a very pale shade of green.
Adding a shadow: Shadows occur on the opposite side of an object to the highlight. Don't use pure black to create a shadow, as this will tend to look stark and harsh. Rather use a dark shade of the main colour of the object, in this case a darker green.
Using complementary colours for shadows: You could also use a dark shade of the complementary colour of the object. The reason for doing this is that complementary colours are said to make each other appear brighter. For a green apple, a shadow in a complementary colour would be a deep red; for a red apple it would be a deep green. The easiest way to get a dark complementary colour is to add mix some black in with it.