When a person commits a capital crime, a mitigating factor is something that might help the person avoid getting the death penalty. ("To mitigate" means "to decrease." A "factor" is something that causes something else. So, in law, a mitigating factor is something that can cause punishment to decrease.)
Mitigating factors do not automatically result in decreased punishment. Judges and juries also think about aggravating factors – things that are likely to cause a more severe punishment.
Also, mitigating factors are not an excuse for committing a crime. They may help explain what caused a person to commit a crime, but they do not mean the person did nothing wrong.