Who has custody of a child when the parents are not married and there is not a custodial order from the court?

The law presumes that an unmarried woman has sole custody of a child born out of wedlock until/unless a court rules otherwise.