I'll go into a bit more detail below but, basically, Einstein discovered that space and time can't be separated. They are part of the same thing, and gravity is actually produced be bending and warping this "spacetime," like a heavy ball sitting on a sheet of elastic.
Classical (or Newtonian) Physics
Time can be considered as a dimension, just like distances. In this way, our universe is four dimensional: three for space and one for time. Before Einstein came along, people thought that these dimensions were fixed: anyone who looked at something would measure the same distances, see the same things happening at the same time.
Einstein realised that this is not true. Two events that appear simultaneous to one observer may seem to happen at different times to a different observer: simultaneity is not preserved.
He came up with this idea by looking at light and realising that light always travels at the same speed, no matter how fast you are traveling. Even if you chase a photon, it always moves away from you at the same speed ($c$) from your point of view.
The only way that this can be made to work is if there is a link between time and space. We can't consider them to be separate things anymore; time and space get mixed together depending on your frame of reference.
This is why physicists talk about spacetime. Just like the x, y & z directions only depend on where you put your axis so it doesn't make sense to consider e.g. the x direction separately from the y & z directions, so the time dimension cannot be considered apart from spacial dimensions since different observers put their axis in different places. The image below shows this: while one observer thinks that $z$ is a spacial direction and $ct$ is a time direction, another observer (one who is moving fast with respect to the first observer) thinks that it's $z'$ and $ct'$ instead.
Einstein then went a step further. He realised that considering time and space together as spacetime allowed him to think about gravity. Einstein imagined spacetime being bent and warped by heavy objects. This way, other object always move on straight lines but those lines look curved to us because spacetime itself is bent.
For example, the moon looks like it's moving in a circle around the earth, but in spacetime it's actually moving in a straight line. These straight lines are called geodesics.
The image below shows this. Here, the earth's mass is bending spacetime and the moon is moving along a geodesic in this bent space, just like a water spins around a plug. It's important to realise that this picture is a 3D picture, but spacetime is actually 4D. We can't show 4D pictures easily because our brains aren't built for it, but fortunately maths works just fine with 4 dimensions.