The onboard Infrared transmitter and receiver diodes allow communicate small chunks of data between Circuid Playgrounds.
infrared send number send a number packet over IR. It may or may not be received.
on infrared received event triggers when a number has been received.
The example shows how a rgb color can be sent over IR and used to turn on the neopixel remotely. Button A sends blue, button B sends red.
Long story short: it's pretty exciting stuff. Read the deep dive on the MakeCode blog.