The mother and father donate half of their DNA to their children. Of course, the parents receive half from each of their parents, and so on. For now we will focus on just parents and children.
The Basics
It's important to understand the basics of how parents pass down their DNA.
In this simple illustration (figure 1), the four children have inherited half of the mothers DNA and half of the father's DNA. The four children represent all possible combinations that the two parents could have had each time they produce a child.

Figure 1
"But we don't look alike"
How your child looks may be a poor indicator of paternity for many reasons, but will still make you question the relationship. If the child looks nothing like you or any of your relatives, it may be time for a DNA test to end the speculation. However, don't be surprised if the DNA test determines that you are related.
In figure 1, you can see from the illustration how two siblings can range from very similar to nearly nothing in common, and still be from the same parents. This is why a DNA test is so important.
My Personal Barcode
Your DNA profile for family relationship testing is made up of numbers (also called alleles). These numbers represent the genetic contribution passed down from each generation of parents.
In figure 2, the numbers represent the results for one genetic location or marker. The parents received their numbers from their own parents and each has passed on one number to their children. Just as with the colors, there are four possible outcomes for the children but if this couple actually has four children, some of the children may inherit the same two numbers and others will not match at all. It’s possible for two siblings to have the same two numbers if we only look at one genetic location and for this reason we examine multiple markers.

Figure 2
When He Is The Father
In figure 3, you can see that the mother and father have contributed equally to the genetic profile of the child. The report would read "the alleged father can not be excluded from being the biological father and the probability of paternity is 99.99%".
You notice the Amelogenin marker has letters instead of numbers. This is because the Amelogenin marker indicates the gender of the individual. XX is for female and XY is for male.
Figure 3
When He Is Not The Father
In figure 4, it is impossible for the man who was tested to be the biological father of this child. He does not share a number (allele) in common at each of the genetic systems tested.
Numbers highlighted in red are DNA types that the alleged father could not have donated to the child. The report would read "the alleged father is excluded as the biological father of the child". Exclusions are always confirmed by a complete second analysis.

Figure 4