First, if you are sued you should definitely show up in court. If you don't, the collector or creditor will get a default judgment against you, and that opens you up to additional collection activity.
I can't advise you on how to represent yourself in court, but you can always show up and let the judge know if you dispute the debt, what you have been trying to do to pay it, why you can't pay it etc. You can find out if the court offers any information that may help you prepare.
Depending on the amount they are suing you for, it may not hurt to talk with a bankruptcy attorney. The consultation will be free and confidential, and at least you'll have the opportunity to find out what they can do to collect if they are successful in getting a judgment against you.