Hammer in Monster Hunter series is pretty straight forward. You have a normal attack & a charge attack, compare these two buttons and you got an update version of the charge attack. The main goal is always to knock out the monster in the fastest way possible.

Source: N4G PC Monster Hunter Rise Hammer Guide & Overview