It depends. If you're in the US, the Copyright Act provides for the possibility of an award of attorneys' fees to the prevailing party, but it is at the discretion of the judge. (Generally speaking in the US, in the absence of a contractual agreement re this, each side pays his/her own unless the plaintiff was
really outrageously off-base in bringing the suit to begin with.)
You might find it helpful to review
Nolo's comments on the US rule re attorneys' fees. And then take a look at
sec. 505 of the Copyright Act.
Meanwhile, perhaps someone with a practice in Copyright could say how often (and when) courts will typically do this?