There are different color primers, all the way from white to black, with greys, reds and even some yellows. Primers have two main uses, acting to improve paint adhesion and to fill small cracks, nicks and scratches (some are very thick in order to do this better). Also a secondary use is when the kit is multi-media (styrene and resin), or when the kit has different colors, the different colors on an assembly can prevent the eye from really evaluating the smoothness near the seam between the pieces. A uniform color from the primer gives you a better idea of what the seam really looks like.
I personally use Krylon primer, which comes in white, black, or a medium dark gray. It is very full bodied, which makes some modelers afraid it will obsure fine detail. It is a bit rough, so always needs to be sanded with fine sandpaper before the first color coat. Because of the full body, it sometimes fills seams by itself eliminating the need for putty on well-fit seams.