From the Super Mario Wiki
Polterguys, originally called Phantom Guys, are ghost Shy Guys found in the Mario vs. Donkey Kong series. They resemble Boo Guys. When Mario or a Mini Mario presses a button the same color as the ghosts, the Polterguys will turn into blocks, allowing Mario or the Mini Marios to pass. In Mario vs. Donkey Kong, Polterguys first appear in the Spooky House world. In Mario vs. Donkey Kong 2: March of the Minis, they appear in the Spooky Attic stage. Polterguy comes from the words "poltergeist" and "Shy Guy".