I already have a button on my Arduino board, but I don't know what pin number should I use in my code?
The schematic at makeblock.com of the mbot mcore board shows switch S3 feeding pin A7, which is an analog input pin.  Note, there is a deplorable 0.1 μF capacitor in parallel across S3, probably intended as hardware-level debouncing.

Also see the Port wiring mBot mCore board thread at makeblock, where one of the posts says there are multiple versions of the board, and provides reference links.

For example, sample code at
newinnovators.ca's “mblock-to-arduino/button-control” page shows pin 2 being used to sense the button.  You may need to run some tests.