The accelerometer is built into the micro:bit.
It can return a gesture - whether the micro:bit is facing up, facing down, being shaken etc. - or x, y, z values.
Find the accelerometer blocks in the Inputs menu, and try making different things happen when you use different gestures.
You could use the accelerometer to notice when you pick up your mug!
These two blocks of code are equivalent.
The one on the right makes it easier to build more complex programs.
As well as your Inputs, the blocks you need for this are in the Logic menu.