The end of any relationship is a difficult time. In cases where the couple wasn't married, that process can be simpler than in cases where parents get divorced.
Unfortunately, if you didn't get married and had children together, that can make the separation more complicated. Both parents may want full or partial custody, or one parent may want visitation.
To ensure everything works out in a legal and appropriate manner, you need to establish paternity of your child as early as possible. Ideally, you went through the process of establishing paternity when your children were born.