Find a Lawyer
Sometimes, it is not clear who a child's father is. Typically, the biological father wants to be involved in raising his child, while a person who isn't the father would want to avoid being saddled with the legal obligations that accompany parenthood, for a child that isn't his (of course, this is not always the case).
Being the parent of a child creates many legal obligations, including the duty to care for the child until they can take care of themselves (typically 18 years, or more). This is effectively a lifelong commitment, so people typically want to be sure that they're actually a child's parent.
There are many cases in which the law will presume that a man is a child's father (thus creating all the attendant obligations) unless it is proven otherwise.
For example, if a couple is married, and a child is conceived and born during the marriage, the law presumes that the husband is the child's father. For reasons that should be obvious, this might not actually be the case. However, the husband will be treated as the child's legal father unless he can prove that he is not the biological father.
This can easily be accomplished with a DNA test, which can determine paternity with an error rate so small that it barely needs to be considered (barring human error in the testing process). However, in many states, a paternity test might not relieve a "father" of his legal obligations. The time in which a person can contest paternity is often limited, and the clock usually starts ticking when the child is born. If you fail to contest paternity within your state's time limit, the results of a DNA test, no matter how factually conclusive, will be of no legal significance.
If a man acts as the child's father for an extended period of time, knowing that there's a chance he might not be the biological father, the law will assume that he has consented to taking on the duties of parenthood. Obviously, it would not be in the child's interest for the person the child has known as his or her father from birth to suddenly abandon them, especially once the child is old enough to remember those events into adulthood.
Furthermore, if a man knows that he is not a child's biological father, but chooses to behave as such, he will be treated as the legal father for all purposes. The same applies when he affirmatively agrees to assume the obligations of a parent.