This is a mystery to me. People seem to have a general sense of how to behave when a band plays but put a person playing music behind two turntables...and things get wacky. DJs in theory should be treated like a solo performing artist because their instrument is their gear (turntables, mixer, or whatever it is they use) and a great deal of time, energy, and care has gone into picking the music for the evening in hopes of entertaining / satisfying the crowd.
There are basically three kinds of DJs.
There are the DJs you hire for an event and these are the DJs that are hired to please their paying clientele. They are more people friendly, tend to work off computers / large booklets of CDs and in turn have a larger selection of music to pick from. They tend to be more people friendly in the sense that taking requests is often part of their gig. These DJs are approachable and are more accustomed to interacting with the room.
There is a subtle difference between this kind of DJ and the next kind but there is a division in style none the less. There are the DJs who are hired by a bar or club to please a crowd and in turn it is the DJ's responsibility to know the kind of crowd they are catering to and try to appease that room to reflect whatever it is the owner's are looking for. The key difference here is the DJ hired usually specializes in a kind of music the bar is looking to pad their atmosphere with and while it is their job to please the people who hired him or her, they still have more control over the music they pick and tend to play sets that reflect their taste rather than relying on requests from whomever hired them or the crowd listening / dancing. These DJs may take requests but traditionally they have a specific collection of songs in mind to play for the night and assuming their style of music matches what the club owners are looking for, the DJ will mostly play only the songs they want to. In the end though, the crowd listening to the music are regulars to the bar / club first and may or may not care who the DJ is to be 100% honest.
The last kind of DJ tends to have more of following on their own (like a popular band) and people seek them out because of the genre of music they play, the quality of records they spin, and their ability to play them in a way that keeps the room interested time and time again. These DJs are ...well to be honest... the kind of DJs that usually don't want to be bugged (IE NO REQUESTS) and tend to have a very specific idea of the songs they will be playing for the night. While they want the crowd to enjoy themselves, the songs they play are their choices (again like a band) and asking them to play some random song that doesn't fit into the style they DJ is like asking Dylan to play a Madonna cover.
Here are some basic DJ etiquette tips for future reference:
1) Most DJs don't play requests so don't bother them unless you are at a wedding or some other kind of private event. This will come as a shock to some of you but it is true. Keep your requests to yourself. They are the professionals when it comes to music and if you think you can do better, go book your own DJ night.
2) Not all DJs are fortunate enough to have a private DJ booth and are forced to place their expensive gear on a table near the dance floor. This table should off limits to anyone but the DJ and you should NEVER place your drink, jacket, purse, ashtray...whatever... on this table. EVER. Besides it being rude and an invasion of their space, for those who DJ records, there is always the risk of a record skipping thanks to the table being bumped and don't get me started on spilled drinks or cigarette butts on a turntable or mixer. You can't afford to spill anything on this gear and if you do, you run the risk of not only being punched out by an unhappy DJ but could be thrown out of the bar for such an enormous social faux pas.
3) Keep your distance. Hovering on top of the DJ all night not only makes you look like a stalker but it is an annoying distraction for whoever is DJing. If you want to know what the DJ is playing, just ask, but keep in mind asking what every other record is gets old pretty fast too. Just sit back an enjoy yourself already. Relax.
4) This is really important. If a DJ has their headphones on DON'T TALK TO THEM !!!! A) they probably can't hear you and B) they are setting up the next song as well as working within a time limit of trying to set up the next song before the other song ends and shouldn't be interrupted. Even if you know them, good for you but you still should never try to talk to a DJ when their headphones are on.
5) Walking behind the table, touching a record as it spins, or flipping through the records a DJ has brought with them is the worst crime of all. It is the ultimate invasion of personal space and you wouldn't walk up to a stranger, sit on a portion of their chair and take a sip of the cocktail to see what they are drinking and then rumage through their pockets? Nope you wouldn't so leave the DJ's stuff alone.
6) It is really this simple. If you don't like the music, leave. As you have just learned, most DJs don't take requests and if you really need to hear some song, go home and play it there. Most of the time whatever song you are dying to hear the rest of the room is not and it will clash with whatever the style of music the DJ is playing / has built their reputation around. And to really drive this point home, the DJs who play vinyl (IE there is no computer) have a much smaller selection of music and probably don't have whatever song you are requesting.
7) Last but not least, you are a friend of the DJ, maybe even a very good friend, but unless you are DJing that night, it is still best to not try and carry on much of a conversation while your friend is behind the table. Certainly say hi, hug... but A) if their headphones are on, wait until they are off to approach them and B) your friend probably won't be behind the turntable all night and you can chat with them when they are done with their set. A distracted DJ not only makes for a crappy conversationalist but it could lead to mistakes that the whole room will hear.
It is really pretty simple stuff and it basically boils down to common sense and respect.