Scars heal through repair mechanisms in the body not regenerative mechanisms. However, in the early stages of fetal growth, wounds heal through regenerative mechanisms. It is time limited, though. There is a certain point in the embryonic growth where a type of switch is flipped and scars begin to heal through repair mechanisms.
In humans, this occurs in the last trimester. Interestingly, fetal wounds heal with little to no inflammation. Scientists do not completely understand this phenomenon. They continue to research it and hope to use the information to aid injured people.