The simple answer is that it can be because of a “free,” that is, relatively unrestricted attachment to the ceiling of the room it is in.
I assume what is being asked in the question is the method by which a Foucault pendulum in a museum is seen to swing back and forth but, in a way, that the end of its swing gradually moves in a circular arc around the floor. Sometimes successively knocking over blocks spaced along that arc.
And, as will hopefully become clear, it is the spinning of the earth that causes what happens. That is the rotation of the earth on its axis (the same rotation that causes the sun to rise and set).
Now, about that free attachment: Of course, the wire or cable of the pendulum cannot come loose from its point of attachment to the ceiling. And so, the entire pendulum moves with the building it is attached to. But not completely! Because of the free attachment, it maintains its orientation back and forth in space while the building is rotating with the rotating earth.
All this is easiest to understand by imagining a Foucault pendulum situated exactly at the North Pole. There it won’t move with the building at all, since the building’s only movement is rotation. Due to its free attachment, the pendulum is able to continue its back-and-forth motion. It does that because of a law of physics that says something only moves if a force is exerted upon it. Free attachment means no force to make the pendulum rotate.
With the pendulum staying in its path, while the building is rotating under it with the rotating earth that it is attached to, the pendulum, at the end of its swing, would gradually move in a circular area around the floor.
A pendulum located at the North Pole would knock over all the blocks spaced along that circular arc on the floor in one day. For the pendulums most of us see, the blocks along only part of the circular arc are knocked down in a day. And, in fact, for a pendulum at the equator, its motion would be governed by its attachment to the building and no blocks would be knocked down as the day progress.