A child ran out suddenly in front of the driver and he hit him
If the driver was going at a reasonable speed when he was approaching the child, and could not avoid hitting him because the child ran out suddenly, such that the experts rule that the accident was unavoidable, then he is excused and he does not have to do anything, whether that is paying diyah or offering expiation.
If he could have avoided hitting him, or he was travelling so fast that he could not avoid it, then he is liable, which in this case means that if the child died he must offer expiation and pay the diyah (blood money). If the child did not die but he suffered some injury, then he must pay the diyah for whatever injuries he caused.
Similarly, if both parties were to blame, both the driver and the child, then the driver must still offer the expiation in full, because it cannot be offered in part.
If there is any reason to blame the driver for the accident, such as if he was negligent or careless, by driving too fast or failing to alert the child, or not trying hard enough to stop, then he must offer the expiation.
In its eighth conference held in Brunei Darussalam in 1414AH/1993 CE, the Islamic Fiqh Council issued a statement on traffic accidents, in which it says:
Accidents which occur as a result of traffic are subject to the rulings on offences which are established in Islamic sharee’ah, even though in most cases they are due to errors. The driver is responsible for the harm caused to others, whether that is to their bodies or their property, if it was his mistake and the mistake resulted in harm. He is not exempt from responsibility except in the following cases:
1-If the accident resulted from unavoidable circumstances, which applies to anything that is beyond a person’s control.
2-If it happened as the result of an action on the part of the affected person.
3-If the accident happened as the result of an error or act of aggression on the part of someone else, in which case the other person bears responsibility.
And it says in the statement:
Fourthly: If the driver and victim both are at fault, then each of them must find out what damage was caused to the other’s body or property. End quote from Majallat al-Majma’ al-Fiqhi, issue no. 8, part 2, p. 372.
From the final clause it may be understood that both the driver and the victim may be liable, such as if a child runs out into the street at a place other than a designated crossing, and the driver is able to stop or to alert him but he does not do so, and hits the child as a result. In this case the liability is shared.
The expiation for (accidental) killing is freeing a slave. If that is not possible then one must fast for two consecutive months, because Allaah says (interpretation of the meaning):
“It is not for a believer to kill a believer except (that it be) by mistake; and whosoever kills a believer by mistake, (it is ordained that) he must set free a believing slave and a compensation (blood money, i.e. Diya) be given to the deceased’s family unless they remit it. If the deceased belonged to a people at war with you and he was a believer, the freeing of a believing slave (is prescribed); and if he belonged to a people with whom you have a treaty of mutual alliance, compensation (blood money — Diya) must be paid to his family, and a believing slave must be freed. And whoso finds this (the penance of freeing a slave) beyond his means, he must fast for two consecutive months in order to seek repentance from Allaah. And Allaah is Ever All‑Knowing, All‑Wise.”
And Allaah knows best.