The most immediate thing to do is get him bonded out - jail is not a nice place to be, especially if you're not used to that sort of environment. In the coming days, he will want to make a consultation to speak with a local criminal defense lawyer (many, if not most, offer free or low cost initial consultations). The first court appearance is a reading of the charge and entering of a plea - if he has a lawyer by that point, they can normally enter a written not guilty plea without him having to appear in court (he can always change that later). He can discuss the circumstances with the lawyer, but it's not usually a good idea to simply plead guilty "to get it over with" - the state still has the burden of proof
, and it's worth a lawyer at least getting whatever evidence the state may have, discussing what exactly happened with your husband to determine if he has any defenses, and the best approach to take. That may in fact be pleading guilty, but if so, a lawyer should be able to work with the prosecutor to limit the sanctions he faces.
I'm not sure exactly what you mean by protecting your children. Is your concern that you will have to tell them? Depending on how old they are, they may not need to ever find out. As horrible as this is, it is considered a misdemeanor
, and not typically something a person goes to jail for if convicted, especially if it's a first offense. Your husband would be looking at something like probation
, community service, and a fine.
Even if they're older, you may want to limit exactly you tell them - that their father got into some trouble with the police (without telling them what it is), but reassure them that everything is going to be okay, that he won't be going to jail/prison, and everything will be worked out. I'm not suggesting lying to your children, just that they don't need to know everything that goes on in an adult's world.