The tilt sensors in the wheels tell the gyroscopes how far forward you are leaning.
The gyroscopes relay this information to the logic board.
The more you’re leaning forward, the faster the logic board tells the motors to spin, to sort of “catch up†with your center of gravity. It’s this simple (yet very clever) mechanism which allows you to control the cruising speed of the scooter with your weight.
Source:LiveScience
Source: http://www.livescience.com/53043-how-self-balancing-hoverboards-work-infographic.html