During the World Cup, the referees sprayed something on the ground. It looked like it was white paint, but it was foamy. It was right before a free-kick on goal.
What was the stuff they sprayed on the ground?
It's called "Vanishing foam".
It's used as an indicator by the referees to indicate the minimum distance the players must maintain from ball, in the event of a free kick, as well as the spot from where it is taken.
Technical details: The can contains water (~80%), butane gas (~17%), surfactant (~1%), and other ingredients (~2%).
Refer this wiki link.
Also another link.