Money is 'fungible'. That means that any single dollar in circulation is identical to every other. If I pick up a lucky quarter on the street, and put it into my right pocket, then when I buy a candy at the store it is irrelevant whether I pay with that quarter or from a quarter I had in my left pocket. Whether you consider it a 'right pocket' quarter or a 'left pocket' quarter, I still have the same amount of money in total.
So asking 'what a company does with its debt' is basically the same as asking 'what money did the company spend in the year?'
Look at the published cashflow statement to see this - it will show incoming debt funds, debt repayments, operating cashflows, and investments in the business.
In some cases, for significant enough cash movements, the financial statements might disclose something like "such and such project required $x investment, which was partially funded through $y in additional debt".
I will caution you that this is a fairly basic concept, so if you are preparing to do some analysis of a company's financial statements for investment purposes, I suggest you keep studying before putting your own money at risk.
The question regarding determining if the debt is 'good' or 'bad' is more difficult to answer - one thing to watch for would be the income compared with annual interest costs, and also any notes which describe when the debt becomes due. This will form one part of analysis of the company's finances, and is a much broader question.