Exact laws and processes vary by location. Some places always require a court process, some don't.
Even if you have full legal and physical custody, that's usually not sufficient for you to do a name change on your own. (It's rare that you'd get the other parent's rights terminated fully, though you'd be able to do a name change on your own if that's occurred. Even if he's not around, it can be in the child's interest to have child support established. If his rights are terminated, the responsibilities go away too.)
Some places have a non-court process where if both parents sign off, it simply goes through. Otherwise you need to go through a formal court process, including notifying the father of it. If he objects, you'd have to explain to the court why it should be changed despite the other parent not agreeing.