Sometimes when a child is born there can be a dispute about whether the father of the child is the child's natural father. Paternity in these cases involve potential health issues and child support. This can be resolved by the court.
If you are a child you can apply to the court for a declaration that a particular person is your parent and that you are the legitimate child of your parents.
If you are a father and you have been asked to pay child support, but you do not believe the child is yours, you can apply for a declaration that either you are or you are not the father.
If your are a mother and need to determine paternity the court can compel the suspected father to provide a DNA sample for determination.