In Maryland, it is presumed that if the mother of the child was married when the child was conceived or delivered, that the husband of the mother is the father of the child.
If you are unmarried and want to determine the father, or whether you are the father, you can file a Complaint for Paternity with the court. However, to keep costs down, it is recommend that the parties conduct a paternity test on their own. Either way, once paternity is determined, the process for custody and child support are the same.
The longer a party waits to contest paternity the more difficult (or sometimes impossible) it will be to have the court determine that a person is not the father.