A queue is a data structure where items are added at the rear and removed from the front, following First In First Out (FIFO) order. Enqueue operation adds an item at the rear, updating the rear pointer. Dequeue removes the item at the front, updating the front pointer. Initially, when the queue is empty, front and rear are undefined. When the first item is enqueued, both front and rear point to index 0. Each enqueue adds an item at the rear, increasing the rear index. Each dequeue removes the front item, increasing the front index and shrinking the queue. This process continues until the queue is empty again.