From the Super Mario Wiki
Blinking Blocks (known as Beat Blocks in Super Mario Galaxy 2 and Beep Blocks in Super Mario 3D World) are a type of block found in a handful of games in the Super Mario series. As their name implies, Blinking Blocks are recognized for alternating between solid blocks and intangible outlines of various colors to the beat of in-game music. Because of this, Blinking Blocks function as both platforms that Mario or Luigi safely can stand on when solid, or as deadly pitfalls in their "vanished" state. Depending on the game, both the physical appearance and functions of Blinking Blocks differ.
Super Mario series
Super Mario Galaxy 2
Beat Blocks are first seen in Super Mario Galaxy 2, appearing exclusively in the Beat Block Galaxy. In this appearance, all Beep Blocks are cube-shaped, and alternate between yellow and green. The player's Wii Remote will also beep three times before the Beep Blocks alternate. Due to the effects of the Double Time Comet, the "Silver Stars in Double Time" mission causes the Beep Blocks to alternate at four times their regular speed (despite the mission's name).
Super Mario 3D Land
Beat Blocks return in Super Mario 3D Land, appearing in World 6-4, Special 3-5 and Special 7-2. In this appearance, Beat Blocks come in an assortment of shapes, and are now red, yellow and blue. In World 6-4 and Special 7-2, all three colors will appear one-by-one, then vanish in the same manner, leaving periods where all or none of the Beat Blocks will appear solid. However, in Special 3-5, the blocks alternate between one color each time.
Super Mario 3D World
Beat Blocks return once again in Super Mario 3D World as they appeared in Super Mario Galaxy 2, where they are now known as Beep Blocks. They alternate between blue and pink-colored blocks. Later levels also include Beep Blocks in quadruple time, named Blast Blocks. When they are in quadruple time, the frequency of alternating between different blocks is the same as the frequency of beat blocks' alternation under the orbit of the prankster comet in Super Mario Galaxy 2. Interestingly, Beep Blocks also appear in levels where the song has different beats per minute (such as Champion's Road), but they still alternate in the beat of the original song's BPM (from Beep Block Skyway and Blast Block Skyway).
Super Mario Maker 2
Beep Blocks, now known as Blinking Blocks, return in Super Mario Maker 2 in the Super Mario 3D World style, behaving the same as in past appearances. However, they now alternate independently from the music, doing so every four seconds instead. They are also notably smaller than in other games, now being the same size as ? Blocks.
Captain Toad: Treasure Tracker
Beep Blocks reappear in Captain Toad: Treasure Tracker in the stage Beep Block Sky Plaza. They are identical in appearance and behavior to those in Super Mario 3D World, but many of them include ladders which do not disappear to allow Captain Toad, who cannot jump, to climb them.
Super Mario Maker 2
Names in other languages