Bankruptcy is very complicated or relatively simple depending on your assets, income and personal financial history. A lawyer should always be used because the laws are very complicated.
A petition is drafted where you list all assets and all liabilities. Exemptions are claimed (what stuff do you get to keep and protect) rights are listed. Past legal actions are listed, along with a myriad of information regarding the past and the future.
Petitions must be electronically uploaded to the court system (mandatory since July 2004).
The case is reviewed the office of the United States Trustee and a local "Trustee" that examines the sufficiency of the filing.
A meeting of creditors is held within about 30 days and then, depending on the type of Bankruptcy (i.e. 7 or 13, or 11, or 12, or 9) things happen...hopefully leading up to a discharge.
Official forms are available on a number of websites for free, but again, this is not something to attempt without an understanding of the laws, their application, and the accepted and established standards of the local Bankruptcy Bench.
Disclaimer: This answer does not constitute legal advice. I am admitted in the States of New York, New Jersey and Massachusetts only and make no attempt to opine on matters of law that are not relevant to those three States. This advice is based on general principles of law that may or may not relate to your specific situation. Facts and laws change and these possible changes will affect the advice provided here. Consult an attorney in your locale before you act on any of this advice. You should not rely on this advice alone and nothing in these communications creates an attorney client relationship. The opinions expressed herein are those of the author only and the fact that he has worked as an Assistant District Attorney; State Supreme Court Clerk; Special Assistant United States Attorney (Hawaii); Assistant Cornell University Counsel or Judge Advocate, United States Marine Corps should not be relied upon to assume that these statements reflect the policy of these organizations.
You should consult an experienced bankruptcy attorney in your area. All bankruptcies are required to be filed electronically and the bankruptcy laws can be complex. Some individuals attempt to file their own bankruptcies but the requirements to provide documents are very strict and the time limits in federal bankruptcy court absolute deadlines. If you miss the deadlines then your case may be dismissed.
Meet with an experienced bankruptcy practitioner with whom you are comfortable. He or she will determine your objectives and evaluate whether there are any alternatives to filing for bankruptcy and, if bankruptcy is the only option, how to go about it.
If a bankruptcy is necessary, the skilled practitioner will assist you in preparing a bankruptcy petition and schedules that reflect your assets, debts, income, expenses and financial history. This bundle of paperwork will allow the courts and your creditors to determine if you qualify for rights that you seek.