For centuries scientists have studied the cause of gravity. Even though there have been theories that have proposed reasons for gravity, we still don't know for sure what exactly causes it. Isaac Newton developed the idea of gravity in the 17th century. He said that it was just a force of attraction that all objects naturally had toward each other. It wasn't until the early 1900's when Albert Einstein came up with his theory of relativity that explained the reason why objects attract each other.
The theory says that massive objects warp space-time which causes these objects to fall toward each other. What is space-time? Space-time is the combination of space and time into one thing. This sounds really strange but every time it has been tested, it has never failed;however, that's not to say that it is completely proven. One way you can prove this is if you go to the top of an extremely high building, time actually speeds up. This is because the further you are from the earth, the less warped time is. That goes for space as well.
There is much more to this theory. This is just a very brief explanation of how Albert Einstein tackled the idea of gravity.