From the Super Mario Wiki
Blue Shell Blocks are blocks that appear in Mario & Luigi: Bowser's Inside Story. Striking one allows Mario to wear a Blue Shell. Luigi can then knock him forward using his hammer. This block is made available when Mario and Luigi meet the Blue Paratroopas. During their travels, Mario and Luigi find a Giant Blue Shell Block and strike it, spreading several Blue Shell Blocks around the Mushroom Kingdom. The Blue Paratroopas notice this and begin yelling at the two. Eventually, they give the two Bros. a block to use. Mario strikes the block and a Blue Shell comes out and lands on Mario's back. After using it, the Blue Paratroopas see that the Mario Bros. can use the shell quite well and teach them the proper way to execute it. Once they learn correctly, the Blue Paratroopas fly off and give the two the Attack Pieces for the Yoo Who Cannon. The blocks are scattered around the over world and inside Bowser for Mario and Luigi to use.