Does a father on a birth certificate have to return the child to the mother? Uk

Hi asking for a friend his ex has been to jail for assaults and has a temper so he is concerned for his baby. Is he allowed to keep his child until contact has been sorted for the mother or does he legally have to give her back? He is on babies birth certificate and in the uk