From the Super Mario Wiki
Directional Blocks are objects that appear in Super Mario 3D Land. They are purple blocks with an arrow on each side. When Mario/Luigi hits one from below, it will move in the direction it points to for a distance that is roughly half of its height/width, which usually allows him to access certain blocks or collectibles he couldn't reach with a normal jump. Their positions can only be reset by replaying the levels they appear in.