Witnesses are paid for each block they produce for the network.
The amount of blocks you produce in a day is determined by your witness rank, which is based off of how much Hive Power users voting your witness have.

I'm currently rank #54 and produce a block every 2 hours or so, or roughly 13 or 14 blocks a day, which awards me roughly 1.24 HIVE per a block for doing so.

More info on my block production here: