A trademark is a brand name that identifies the source of particular goods. Whether or not a trade name is registered with the US Patent and Trademark Office, a business has a trademark in its trade name because its name identifies the company as the source for a particular set of goods. Parodies are usually protected from trademark lawsuits because they are critical representations of or jokes about a trade name. Since a parody is obviously not the source of a certain product or service, it usually isn't infringing trademark rights.
Clarity matters in parody. If there's a chance the public could confuse the source of goods, there's a chance the parody is a trademark infringement. For example, LL Bean lost a case against a sex magazine that parodied its catalog in a photo spread because at the time, it was unlikely someone would consider LL Bean as having created, or been a part of creating, the spread.
Commercial gain is likely to undermine a legal defense of parody. A trade name exists for commercial purposes, so attempting a parody for commercial purposes might infringe on trademark rights. Contrary to the LL Bean case, Gucchi Goo, a purse company, was found to have violated a trademark because their alleged parodies of Gucci handbags were a commercial venture, with products similar enough to Gucci's to create confusion as to who designed the bags.
Some judges believe the First Amendment trumps everything. Expressive freedom is one of our fundamental rights, so a parody that serves a genuinely critical function may be protected. For instance, a federal judge in Atlanta decided a man who runs the site Walocaust.com, a parody of WalMart's labor policies, has a First Amendment right to express his criticism that trumps WalMart's claim of trademark violation. Judges may balance the rights protected by the First Amendment with the likelihood of confusion created by a parody.
Even though trademark infringement is usually decided by the likelihood of confusion to result, if no harm occurs, courts may favor the parody, regardless of how the trade name's use affects the public's understanding of the name as the source of a certain product. For example, Hormel, makers of SPAM, wanted to block the sale of certain merchandise for a Jim Henson movie that included a pig named SPA'AM. The movie character was allegedly "grotesque" and "evil," but the judge decided that he was, at worst, "untidy" and that parodies of Hormel's pork product were widespread enough in entertainment that there was no harm in this instance.
Parodies that include drugs or are part of pornography may come under closer scrutiny because of social values. The Dallas Cowboy Cheerleaders prevailed against the owners of the pornographic film, "Debbie Does Dallas," because of the movie's depiction of the cheerleading squad in such a squalid manner. The parody used strong enough content that it was likely to affect the perception of the Cowboy Cheerleaders.