Birthmarks consist of various types of tissues which appear in the skin and are therefore visible. Occasionally, there are inheritable conditions where birthmarks appear, but in most people the birthmarks are harmless and are not associated with underlying disease. It just so happens that during development of the fetus, groups of cells don't go to their proper place and grow in the wrong places in the wrong proportions.
Birthmarks are due to genetic causes.
Some are due to pigments, others are due to blood vessels etc. The site at which the birthmarks appear is dependent on whether the cells there have been 'programmed' to do so. Certain parts of the body are more prone to having birthmarks.