If you’re not married to your child’s mother and paternity hasn’t been established, you can file a petition asking the court to declare you the legal father. You have the right to an attorney at any stage of that process (at your own expense), and so does the mother.
Request genetic testing for all three of you as part of the case — if you ask, the court will order it, and the results become part of the record. Once paternity is established, you’ll be responsible for child support, but you’ll also have standing to request custody or visitation. If you want time with your child, you have to affirmatively ask the court for it — it won’t happen automatically.