I cannot speak as to other states, but in Washington State there is a minimum 90 day long waiting period from the time the divorce case is filed with the court until the time that the court can finalize the divorce.
However, that requires the parties to have reached agreement on all issues and have signed off on the final orders prior to the end of the 90 day period. This means having reached agreement on all of the following that apply: division of property and debt, parenting arrangements, child support, spousal support, and even restraining orders if one party has requested them.
If you have not reached agreement within the 90 day waiting period, you can finalize the divorce once you do reach full agreement, any time up until your trial date.
If you do have to go to trial, the amount of time you will have to wait varies from county to county. In King County, you are assigned an approximate trial date when you first file the divorce. Right now the trial dates are running about 11 months out from the date of filing. In Snohomish County on the other hand, they do not assign the trial date until the parties request it, but then the parties need to be close to ready as the dates tend to run only a few months out from the request.
There may also be other requirements you need to meet before you can finalize. Many counties, including King County, require parents to attend a parenting seminar before they can finalize. Many counties also require the parties to attend some form of dispute resolution (such as mediation) before they can proceed to trial. King County also has a special class on court procedure that pro se parties (parties without lawyers) may be required to attend as well.
It should be noted that the 90 day long waiting period may not apply to Legal Separation actions (the counties do not all agree on this). A Legal Separation does all the things that a divorce does – divide property, make arrangements for children and support, etc. – but without actually ending the marriage. A couple that has been legally separated is technically still married, but is no longer a community (i.e. they do not hold property jointly, etc.).