Who has custody if the father of your child and you never were married?

Generally in the United States an unmarried mother has sole custody until the father has established his paternity legally.