That's the new cooldown feature added in the combat update, aka 1.9. It will appear when mining a block without finishing, switching to a tool/empty slot, and attacking any mobs. Attacking repeatedly will make your attacks do less damage, making you time your attacks more carefully.