Good debt: you buy a house. You now own the bank $300,000 and after your loan term you end up paying the bank $400,000 after interest. It took 30 years to pay that debt but since houses went up in price your initial $400k spent is now worth $500k.
Bad debt: you see this nice new TV at best buy. It costs $3k, but its top of the line. Now, you don’t have $3k to drop on a TV, so you put it on the credit card. It takes you ~3 years to pay it off @ 20% interest. In the end you will pay about $4k for the TV, and in 3 years time that TV will most likely be worth 1/10 of what was paid.
The idea that you need to avoid all debts is not practical to most people and not really good financial advice. The exception are people who can’t handle the responsibility of credit (which tend to be the people who get this advice, and tend to be younger people) or people who have jobs that are too inconsistent to keep up with regular payments (which tend to be poorer people).