From an apple hitting him on his head. This helped him theorized that gravity was not only effecting small objects but much larger objects like the moon. Additionally, this theory was revolutionary in many of scientific fields.
"From an apple falling on his head" is a little vague, and probably jot historically true. Newton realized that the Moon is falling with the same acceleration an apple would fall at the same distance as the Moon. Therefore they are both falling because of the same force, namely gravity. This unified celestial and terrestrial physics! Notice I said that Newton realized the Moon was falling. Falling is the key word here!
Newton thought there was a force acting on the moon because he theorized that the earth's gravity was pulling the moon but kept spinning around in an orbit also due to a force pulling it away and therefore keeping its balance.