Queue — abstract data type with access to  elements on a first-come — first came out» (FIFO, First In — First Out).
For ease of remembering, you can remember the usual queue in the store.

queue<int> a; – creating an empty queue with no elements 

a.push(5); – add the value 5 to the end of the queue
 
a.pop(); – remove the first element in the queue
 
int b = a.front();  – return the first element in the queue to the variable  (without deletion)
 
a.empty() – return true if the queue is empty,  and false otherwise.

An example algorithm
add a point to the queue (x0,y0)
remember the color of the starting point
until the queue is empty
  {
  take a point (x,y) from the queue
  if A[y][x] = color of starting point then
    {
    A[y][x] = 2;
    add a point to the queue (x-1,y)
    add a point to the queue (x+1,y)
    add a point to the queue (x,y-1)
    add a point to the queue (x,y+1)
    }
  }