First let’s see special relativity.
For an observer moving at constant velocity, the speed of light within a vacuum is the same no matter, the speed at which an observer travels.
Which precisely tells that, when we see an object moving at a very high speed (constant velocity), the objects appear to be compressed.
Events that occur at the same time for one observer could occur at different times for another.
General theory of relativity
Albert Einstein put forward his special theory of relativity in 1905. With a great work and effort, after ten years, in 1915 he put forward his General theory of relativity, where the limitations of special relativity ( no acceleration) were eliminated.
In General theory of relativity, the gravitational force is considered, since, the accelerating motion is acceptable. The space-time is assumed to be a fabric. Every other planet and star applies gravitational force on this fabric which facilitates the planets to move around the stars. This looks something like the image below.
Gravitational waves are also indirectly assumed in General relativity( learn more about the Gravitational waves here Gravitational waves).
This scenario is clearly understood with the video below.
Also the Electromagnetism works on the same principle. Let me know, what do you think?