Denying a debt in court is a legal document. If you deny it to avoid paying something you actually owe, it can be a contempt of court. Have documentation to back your claim.
If you deny a debt that someone is taking you to court for, then you better have proof to back up your claim. If they are taking you to court then they have some type of paper trail. An attorney will advise you of your rights and options.
You better bet your behind that it is TRUE that this is not your debt and you better have proof to prove it. If your story sounds fishy at all they can send the FBI to investigate.
If you want to deny a debt in court, make sure you have proper documentation to prove your case to the judge. Be prepared to back up your case. Also, make sure you file necessary paperwork needed for the court system.