That's way too broad of a question. There are many different types of lawyers.
That would be like asking what an engineer does. It greatly depends.
Getting paid - this greatly depends on what type of lawyer you are, what firm you work at (if any), and the level of experience that you have. Again, way too broad of a question.
Example: if you are a tort lawyer (personal wrongs/injuries) you probably get paid on a contingency fee basis. This means your firm will typically get 1/3 of whatever you win. Notice that I said "your firm" - you personally won't get 1/3 but your payment arrangement with your law firm will determine what percentage of that 1/3 you will get.
You'll always hear about lawyers making $150 to $250 per hour. While it is true that lawyers CHARGE this much, you won't end up with this much in your pocket because the money goes to the firm, and then you are paid your agreed hourly rate or salary.
You definitely need legal help here.
If he doesn't know whether or not this is his child, that is something he needs to find out. If something happens to him while in service, this child might be entitled to support and benefits that will not be given without establishing parentage.
For you two as a couple, if he loses a court case on back child support, you could be faced with a huge amount of back payments to address, which by the way are deducted off your tax refunds if not paid right away.
There are also issues of visitation to be worked out, as well as his right to help raise this child.
If I were him, I would first go to family court and demand a paternity test. He can do that on his own without an attorney. If he is the father, then you need a lawyer.
You may want to see if the JAG office can provide advice.