When the scar is raised, its called a hypertrophic scar, and it is caused by excess collagen production. Atrophic scarring (when its sunken) is caused by loss of underlying tissue such as fat.
it turns into a scar when it is healing. when it starts to heal it pushes all the dried skin up and the new skin starts to come out. i think that is the way it works.