I cannot speak to Spanish law, but that is not how it works in England and Wales.
Let us return to the foot injury example. Crimes exist before conviction. If someone deliberately stamps on my foot on the train, breaking several delicate foot bones, that's got to be a charge of grievous bodily harm. We will call the someone, Peter
Grievous bodily harm is a indictable offence, IIRC, which means it will be tried in Crown Court, before a jury. This may be important later.
Most criminal offences, although not all, have two equally important components. The first is the actus reus, which is a Latin term for the concept that the deed was committed. In our GBH example, that means the jurors must all be convinced that someone broke the bones in my foot
The second is mens rea, which is a Latin term used to discuss intention. Now, the prosecution have to convince the jury that it was Peter who did it, and that he meant to stamp on my foot, or otherwise was fully aware he was doing it. Perhaps it was a crowded train, and it's a case of mistaken identity. Maybe it was Sam who did it.
Or perhaps it was Peter's foot that broke my footbones, but it was a genuine accident, because Peter lost his balance when someone else down the carriage shoved him.
The jury must be convinced that Peter broke my foot, and that he intended to, beyond reasonable doubt. If they are unsure of either, they must acquit Peter of GBH. They may well be convinced it was Peter's foot, but that he didn't intend to do so.
It is a standard legal concept that Person A can be simultaneously a victim of crime by the hands of Person B, with all the attendant psychological and physical effects of that crime, while Person B can be legally innocent, because the jury weren't convinced Person B meant to commit the crime.