Gravity is the phenomenon that all massive particles or bodies exert a force of attraction upon all other particles with mass in the entire universe. Massive does not mean big, but instead anything that possesses mass. For example, the Earth is exerting a force upon the pen on my desk, this force is not itself gravity, but is due to gravity. Not also is the Earth exerting a force upon the pen, but the pen is exerting a force upon the Earth, though the effects of this force are so small as to be undetectable. In Newtonian mechanics, this force is described by the equation:
F = Gm1m2/r2 where F is the force between the masses, G is the gravitational constant, m1 is the first object's mass, m2 is the second object's mass, and r is the distance between the two objects. Isaac Newton formulated this law around 1700, and more information can be found at en.wikipedia.org/wiki/Newton's_law_of_universal_gravitation
However, Newton conceded that he had no idea what caused this mysterious force of attraction between bodies. It was not until 1916, when Albert Einstein published his general theory of relativity, that the question "what is gravity?" could be more fully answered, though his theory may still not be correct, and as science develops our understanding of what gravity truly is may progress.
Einstein first formulated his special theory of relativity as a precursor to his later general theory. The special theory of relativity is the theory used to explain some phenomena experimentally discovered by Michelson and Morley. It was known before Einstein that light exhibited wave like properties (such as diffraction and reflection) and so there were strong grounds for believing light to be a wave. (We now think of light, and indeed all particles on the quantum or tiny scale, to be both a wave and a particle simultaneously, though this seemingly paradoxical dual nature was only just being discovered at the time.) Since light was believed to be a wave, it made sense that the waves propagated through some medium, which was call aether. Since the Earth was travelling through space, it was travelling through the aether, and so as it circumnavigated the Sun it should have passed in two different directions through the aether. This should have caused light passing through Michelson and Morley's apparatus to move slightly slower in one direction than another. However, it was found that the speed of light remained constant for all observers. A practical example will explain how counterintuitive this idea is. Imagine two cars on the motorway, travelling at the same speed of 70 miles per hour relative to an observer standing by the side of the road. If the man in the car behind were to shoot a paintball at the car in front going at 100 miles per hour relative to himself, the observer would say the paintball went 170 miles per hour, 100 due to the shot from the gun, and 70 because the car was travelling 70 miles per hour anyway. However, the man in the car in front would judge that relative to himself, the paintball was going at only 100 miles an hour, as the shot is fired at 100 miles an hour relative to both him and the car behind. So far things are as we would expect. However, if the car behind had shot a laser, which would travel at the speed of light, then both the observer and the car in front would say that the laser beam had travelled at the same speed, that is 300,000 kilometres per second (to 2 significant figures). The "extra" 70 miles an hour the car was doing has no effect on the speed of light. This situation is analogous to the Michelson-Morley experiment, and Einstein's explanation was that relative motion causes time to be seen as going slower, and distances to decrease. He also replaced the notion of space and time being two very separate things with one concept of space-time, and explained the relativistic effects in terms of rotations through this.
Having discovered space-time, Einstein hypothesised that matter causes space-time to bend. For example, a large body like the Sun causes a large "well" to exist in space-time; orbits that the planets take around the Sun is due to the planets taking the shortest distance between two points on a curved surface. We think of the shortest distance between two points as a straight line, but on a curved surface this is not the case. For example, the shortest distance between two points on a globe is an arc of a circle (a "great circle") centred on the Earth's centre, which looks intuitive when looking on a globe. If you were to draw this line on a flat map, then the straight line drawn between two points would not be that same distance, the shortest path between the points would be the "great circle" arc, which would be a curve on the map. Analogously, we see the planets taking curved paths around the Sun, in fact through space-time they are going in straight lines. However, our "map" on the universe is constricted to not seeing the "wells" and "hills" in space-time, and going through one of the dimensions (which we call time) at a tremendous pace, so we see the orbits the planets take as elliptical. Gravity could then be described as the curvature of space-time caused by massive objects.
For more information on relativity, there are many good books such as "The ABC of Relativity" by Bertrand Russell, which was the main source for this article. en.wikipedia.org/wiki/Theory_of_relativity is also a good source.
Einstein's theory is still just a theory and so could be wrong. There are plenty of other theories that try to merge gravity with the other forces of nature, such as quantum loop gravity. However, Einstein's theory of general relativity revolutionised the way we think about the universe and about space, time, mass, energy and gravity.
F = Gm1m2/r2 where F is the force between the masses, G is the gravitational constant, m1 is the first object's mass, m2 is the second object's mass, and r is the distance between the two objects. Isaac Newton formulated this law around 1700, and more information can be found at en.wikipedia.org/wiki/Newton's_law_of_universal_gravitation
However, Newton conceded that he had no idea what caused this mysterious force of attraction between bodies. It was not until 1916, when Albert Einstein published his general theory of relativity, that the question "what is gravity?" could be more fully answered, though his theory may still not be correct, and as science develops our understanding of what gravity truly is may progress.
Einstein first formulated his special theory of relativity as a precursor to his later general theory. The special theory of relativity is the theory used to explain some phenomena experimentally discovered by Michelson and Morley. It was known before Einstein that light exhibited wave like properties (such as diffraction and reflection) and so there were strong grounds for believing light to be a wave. (We now think of light, and indeed all particles on the quantum or tiny scale, to be both a wave and a particle simultaneously, though this seemingly paradoxical dual nature was only just being discovered at the time.) Since light was believed to be a wave, it made sense that the waves propagated through some medium, which was call aether. Since the Earth was travelling through space, it was travelling through the aether, and so as it circumnavigated the Sun it should have passed in two different directions through the aether. This should have caused light passing through Michelson and Morley's apparatus to move slightly slower in one direction than another. However, it was found that the speed of light remained constant for all observers. A practical example will explain how counterintuitive this idea is. Imagine two cars on the motorway, travelling at the same speed of 70 miles per hour relative to an observer standing by the side of the road. If the man in the car behind were to shoot a paintball at the car in front going at 100 miles per hour relative to himself, the observer would say the paintball went 170 miles per hour, 100 due to the shot from the gun, and 70 because the car was travelling 70 miles per hour anyway. However, the man in the car in front would judge that relative to himself, the paintball was going at only 100 miles an hour, as the shot is fired at 100 miles an hour relative to both him and the car behind. So far things are as we would expect. However, if the car behind had shot a laser, which would travel at the speed of light, then both the observer and the car in front would say that the laser beam had travelled at the same speed, that is 300,000 kilometres per second (to 2 significant figures). The "extra" 70 miles an hour the car was doing has no effect on the speed of light. This situation is analogous to the Michelson-Morley experiment, and Einstein's explanation was that relative motion causes time to be seen as going slower, and distances to decrease. He also replaced the notion of space and time being two very separate things with one concept of space-time, and explained the relativistic effects in terms of rotations through this.
Having discovered space-time, Einstein hypothesised that matter causes space-time to bend. For example, a large body like the Sun causes a large "well" to exist in space-time; orbits that the planets take around the Sun is due to the planets taking the shortest distance between two points on a curved surface. We think of the shortest distance between two points as a straight line, but on a curved surface this is not the case. For example, the shortest distance between two points on a globe is an arc of a circle (a "great circle") centred on the Earth's centre, which looks intuitive when looking on a globe. If you were to draw this line on a flat map, then the straight line drawn between two points would not be that same distance, the shortest path between the points would be the "great circle" arc, which would be a curve on the map. Analogously, we see the planets taking curved paths around the Sun, in fact through space-time they are going in straight lines. However, our "map" on the universe is constricted to not seeing the "wells" and "hills" in space-time, and going through one of the dimensions (which we call time) at a tremendous pace, so we see the orbits the planets take as elliptical. Gravity could then be described as the curvature of space-time caused by massive objects.
For more information on relativity, there are many good books such as "The ABC of Relativity" by Bertrand Russell, which was the main source for this article. en.wikipedia.org/wiki/Theory_of_relativity is also a good source.
Einstein's theory is still just a theory and so could be wrong. There are plenty of other theories that try to merge gravity with the other forces of nature, such as quantum loop gravity. However, Einstein's theory of general relativity revolutionised the way we think about the universe and about space, time, mass, energy and gravity.