A queue is a waiting line where the first people to enter the line are the first to receive service. (This is as opposed to a stack where the most recent items are handled first.) Queues will appear in two places in World of Warcraft.
When a server is at capacity, the individuals attempting to log into it will be placed in a queue. They will only be permitted to access the server as other individuals log off. They are welcome to leave the queue and join another server rather than waiting. The odd quirk about queues is that if players are aware there is a queue on their server, they often actively attempt to not log off for fear that they may be stuck in the queue in the future. During the early days of WoW, this was a major problem, but has been mostly resolved by the presence of many many more servers than the game initially launched with.
If a player signs up for a battleground, they will generally have to wait until a suitable battleground has been formed. Depending on the presence of other players on both their faction and the opposing faction within the battlegroup, this may be swift or take a very long time. Fortunately, a player can queue for each battleground separately, and move between them if they like.