Often people does not lock their laptops and go away. Thats a perfect case for some evil jokes.
ls making a cd Heh, people with wireless mice and keyboards are easy pickings! ;-)
At early days we used to shut down windows machines shutdown /i unknowingly
I used to send mail to the whole team from my co-worker's machine when left unattended. Usually, the mails were party mails, and the person has to give the party as we include managers! (One can't say NO to managers π)

I think this one is very common, but I'll reiterate it anyway:
We used to use this trick heavily during the college days and even in my first job.
Not programming related, but an "office" prank
Way way way back in the day - my first job as a teenager in fast food.
A girl I worked with egg'd my car. I found out who it was (a friend of mine knew she was going to do it)
The next day; I got the approval of the manager and when she wasn't looking, sprayed her with Pam (a spray on butter for baking) and covered her in cinnamon sugar.
Harmless but if you don't want the repercussions, don't do it in the first place :)
Now a days; even simple pranks are a loss of production time and I'm not gonna be responsible for that. No place for it in a professional setting IMO.
(and thank god the car was a pos - had it been a nicer car, she'd have paid for the damages; egg sitting on car paint over night will remove the clear coat in no time.)
I once wrote a mail from one coworker's laptop to someone else: "I love you, please marry me"... one thing I learned from it is that something like that can and will backfire.
The next day, someone put up wedding posters about me and the other guy (I was the bride because of my long hair). The joke carried on until the upcoming summer party, at which the wedding should have taken place. However since it was the wedding organizers who chickened out, the whole thing came to an end.
Well, it was great fun while it lasted :D
Never take your coworkers' pranks seriously, or you will have a bad time
No One
code monkey
When I worked in an electronics test lab it was always a laugh to bang the underside of the bench with a hammer while your colleague had their head inside a live piece of kit...