The majority of information about your credit history can stay on your credit report for up to seven years according to the Federal Trade Commission's Fair Credit Reporting Act, which dictates how information about consumers is handled through various credit reporting agencies.
While the seven year limit applies to most information - there are some exceptions to the rule which should be noted:
There are other exceptions as well that won't have much effect on most people so I won't outline them here, but you can find them in the FTC documents if you're curious enough.
Just because your bad debt will last up to seven years on your credit report doesn't mean you'll have to wait seven years to get credit however, the more time that's passed the lower the risk will be to most creditors. If you can start off by getting smaller amounts of credit and demonstrating a good track record, you should be deemed credit worthy to most much sooner than that.