Pillows are created when water hits a rock head on and folds back on itself creating a cushion like bumper against the face of the rock wall.
Whenever water hits a rock it has to go somewhere. Sometimes it will go past the rock following around each side. At other times it will flow up and over the rock, or as with a siphon and undercut (see hazards section) it can even flow into, under or through the rock.
In this situation the pillow is caused by the current hitting the rock and folding back on itself and flowing back upstream. This forms a nice cushion style pillow around the upstream side of the rock. A pillow is a good indicator and sign that the rock is a safe rock. If you see a rock that has water running directly at it and there is no pillow, stay away! That rock is likely to be undercut.
The pillow created the water flow also pads out the rock meaning if you flip over onto it, it will generally slow you down a bit before you brush up against the rock or wall. In some cases a big pillow can also be a great place to play but, be sure to safely check this or ask someone who knows the river before you do.