It is not a hard and fast rule that you have to hire an attorney, but it is advisable. Both of the parents can come up with an agreement of their own, but you never know when all hell breaks loose. Hire a lawyer just for safekeeping, let him do all the paperwork and all the formalities that come with the procedure.
Once you file the petition, you need to know the rules and regulations of the state you live in. Every state has its own laws and you need to be on the same page with the legal system.
Usually in a divorce, the custody arrangement is already in place. You need to file in the petition to revise the current court-order agreement. If you do not have a custody agreement and you file the petition, then you will need it to establish a joint custody agreement soon after.
You need to give your input regarding the custody of the child and the family court would then be able to come up with a setup considering all the variables. You have to file this with the petition.
The other parent should be informed about your input. A copy should be send to the other lawyer and the parent.
You need to build a strong argument to defend your case.