I know it has something to do with gravitational pull, but I don't know why.
Newton's first law of inertia states that all object in motion will continue in a straight line at a constant acceleration until acted upon by an unbalanced and outside force. In space, there is no friction to slow down and stop bodies such as the moon.
Gravity tries to pull the Earth and the Moon together. So, the moon is trying to move forward, while it is moving towards the Earth. Swing a string with a weight attached to the end of it around. The weight is trying to move forward, but the string prevents it. The end result: the weight orbits your hand.
A fun way to visualize this is to stretch a rubber sheet and pin it down, but it can't touch the ground (support it with books and such). Now put a marble on it. The marble will distort the rubber around it and all smaller marbles that touch the rubber and are close enough to this depression will go towards it. Einstein said that this shows that the first marble's gravity attracted the second. Now pick the second marble back up and roll it forward on the sheet. It will now "orbit" the first marble. Gravity!
No problem. Always trying to help
Both the moon and the earth orbit around a common center of mass (barycentre or barycenter), which happens to be about 4700 km from the center of the earth, about 3/4 of the way to the surface of the earth from the center.
The larger body has momentum (m*v) at the same speed, so it takes the trajectory closest the center of mass of the two body system (barycenter).
center of mass of the two bodies is going to form that eliptical trajectory, the barycenter will be inside of the larger body.
See another thread here in physics forums.
I am no expert, but I had the same question and researched the answer.
Separate names with a comma.