This is a complicated question, and unless you’ve filed bankruptcy in the past 8 years AND received a bankruptcy discharge, it does not apply to you.
If you want to discharge your debts in a new chapter 7, you have to wait for 8 years from the date of filing the last Chapter 7 (that gave you a discharge). If you had a discharge in a 13, then you have to wait 6 years from the date that Chapter 13 was filed. (Unless that Chapter 13 paid either 100% of the unsecured claims or paid 70% of the unsecured claims and was proposed in good faith).
If you want to discharge your debts in a Chapter 13, then you have to wait two years from the file date from your last 13 that got a discharge. If you want a discharge in your Chapter 13 after filing a 7, then you have to wait 4 years from the file date of that Chapter 7.
Here is a handy chart that someone sent me (I have no idea who put it together, but it is a good one):