In a legal context, a lawsuit, motion, or appeal that lacks any basis and is intended to harass, delay, or embarrass the opposition.  This can result in a successful claim by the other party for the costs of defense, including attorney's fees.  Judges are reluctant to find an action frivolous, based on the desire not to discourage people from using the courts to resolve disputes.

Definition provided by Nolo’s Plain-English Law Dictionary.