A queue is a data structure of the First-In, First-Out (FIFO) type (the first input is the first to exit). A practical example is the queues to get a service, how to pay at the supermarket, or get your hair cut at the hairdresser. Ideally, you are served in the same order as you were presented to. This is exactly how a FIFO queue works.