The metric tensor is the mathematical object that tells you how to measure distances and time intervals at every point in spacetime. It is the precise version of a Lorentzian metric, written so it can vary smoothly from place to place.
In flat, gravity-free spacetime, the metric tensor is simple and constant everywhere. Near a massive object like a star, it changes from point to point, and it is exactly this point-to-point variation that general relativity identifies as the curvature of spacetime.
Solving Einstein’s field equations means finding the metric tensor for a given distribution of matter and energy, since once you know it, you know the geometry of spacetime itself, and therefore how objects will move through it.
In four dimensional spacetime, the metric tensor has sixteen components arranged in a four by four grid, though its symmetry cuts that down to ten genuinely independent values at each point. Those ten numbers are exactly what Einstein’s field equations solve for, given a particular distribution of mass and energy, which is why finding an exact solution, like the one Karl Schwarzschild found for a non-spinning black hole just weeks after general relativity was published, counted as such a significant achievement. Most real astrophysical situations are far too complicated to solve exactly, so much of modern gravitational physics relies on powerful computers to calculate the metric tensor numerically instead.
In ordinary flat space, the metric tensor reduces to nothing more exotic than the Pythagorean theorem, the familiar rule for calculating distance using right triangles. What makes general relativity’s version so powerful is that the same basic idea, measuring distance from coordinate differences, still works even when that distance-measuring rule changes smoothly from point to point across a curved space.
This is also why the metric tensor is sometimes called the fundamental object of Riemannian and pseudo-Riemannian geometry, the branch of mathematics general relativity borrows its entire toolkit from.