My boyfriend cat keeps attacking my child...advice?

Take to a no kill shelter or ask around through friends/family for kidless family to take on

What has the child done to the animal? So many many many times a pet “reacts for no reason” at a young child. Every time, every single time, that child has done something pretty nasty to that animal that “no one saw” or “child was just playing”