What is the vanishing spray referees use?
On a free kick the ref sprays a temporary white foam line to mark where the defensive wall must stand (10 yards back). It vanishes on its own after about a minute.
Explain further
Here is what is actually happening when the referee pulls a little can off the belt. When a team earns a free kick close to goal, the defending side is allowed to form a "wall" of players to block the shot, but they have to stand at least 10 yards (about 9.15 meters) away. The problem officials faced for decades was creeping: the wall would inch forward and the kicker would nudge the ball forward, each trying to steal an advantage. The foam ends that argument. The referee marks the line the wall must stay behind, so nobody can cheat once the official turns away.
The spray is mostly water, a propellant gas, and a surfactant, so it looks solid for a moment and then breaks down, leaving the grass clean within roughly a minute. It is purely a visual aid and carries no penalty by itself. The lines simply make an existing rule easy to enforce on the spot.
If you are new to the sport, know that this is a recent fix, not some ancient ritual. It came out of South American soccer, went global at the 2014 World Cup in Brazil, and you will now see it across most top leagues whenever a free kick is dangerous enough to need a wall.