When the unit on either side of the blocker unit is attacked, you can exhaust the blocker and cause it to take damage instead. While blocking, the creature is considered to have temporarily moved in front of the adjacent unit, so effects such as smash will take effects too.