Its a crime if a person Manufactures or creates counterfeit/fake money or tries to use it.
Giving it to someone as a gag doesn't constitute a crime except if that person knows its counterfeit tries to use it, was apprehended, I think the person distributing the fake money would have some questions to answer.
It probably wasn't one of his better ideas!
Tight Federal laws for counterfeit money for obvious reasons.
If you use counterfeit money by accident you lose the money, you're not reimbursed. The merchant finding the counterfeit money is supposed to file some reporting and forward the reporting and currency to law enforcement.
The police or the Secret Service will talk to you. And if they're convinced that you didn't know it was fake, they'll ask you where you got it in hopes of tracking it down. They won't charge you if you were duped, because you're a victim (you're out $20).