Tensors are the mathematical objects that transform in a well-defined way under general coordinate transformations, making them the natural language for expressing physical laws in a form that is valid in all coordinate systems (general covariance). A tensor of type (p,q) has p contravariant (upper) indices and q covariant (lower) indices, and transforms with p factors of the Jacobian and q factors of the inverse Jacobian under coordinate changes. The metric tensor raises and lowers indices, connecting contravariant and covariant components. Einstein's summation convention, index manipulation, symmetrization, and antisymmetrization form the computational backbone of GR. The requirement that physical equations be tensor equations — valid in all coordinates — is the mathematical expression of the principle of general covariance.
In special relativity, the natural coordinate systems are inertial frames related by Lorentz transformations — linear transformations that preserve the Minkowski metric. Vectors transform with a single Lorentz matrix, and the machinery is relatively simple. General relativity abandons any preferred class of coordinates: you may use spherical coordinates, co-moving coordinates, rotating coordinates, or any other smooth labeling of spacetime events. The price is that coordinate transformations are now arbitrary smooth functions x^μ → x'^μ(x), and the mathematical objects describing physics must transform consistently under these general transformations. These objects are tensors.
A tensor of type (p,q) at a point in spacetime is a multilinear map that takes p one-forms and q vectors as inputs and produces a real number. In coordinates, it is represented by components with p upper (contravariant) indices and q lower (covariant) indices: T^{μ₁...μ_p}_{ν₁...ν_q}. Under a coordinate change, each upper index transforms with the Jacobian ∂x'^μ/∂x^α (the same way vector components transform) and each lower index transforms with the inverse Jacobian ∂x^β/∂x'^ν (the same way one-form components transform). The metric tensor g_μν is a (0,2) tensor; a vector field V^μ is a (1,0) tensor; the Riemann curvature tensor R^α_{βγδ} is a (1,3) tensor. Scalars — quantities with no free indices — are (0,0) tensors, invariant under coordinate changes.
The Einstein summation convention is the notational engine of tensor calculus: any index that appears once as an upper index and once as a lower index in the same term is summed over all coordinate values (0,1,2,3 in four dimensions). This contraction reduces the rank of a tensor by two. For example, contracting the Riemann tensor R^α_{βαδ} produces the Ricci tensor R_{βδ}, a (0,2) tensor. The metric tensor g_μν and its inverse g^{μν} (defined by g^{μα}g_{αν} = δ^μ_ν) raise and lower indices: V^μ = g^{μν}V_ν. This operation does not change the geometric object — it converts between the tangent-space representation and the cotangent-space representation — but it changes the component values in general.
A critical subtlety is that ordinary partial derivatives of tensor fields are not tensors (except for scalars). The partial derivative ∂_μ V^ν acquires a non-tensorial term under general coordinate transformations because the basis vectors themselves change from point to point in curved spacetime. The fix is the covariant derivative ∇_μ, which adds a correction term involving the Christoffel symbols (connection coefficients) that exactly cancels the non-tensorial piece. The covariant derivative of a tensor is again a tensor, which is why all derivative operations in GR are expressed using ∇_μ rather than ∂_μ. This machinery — index manipulation, metric raising/lowering, covariant differentiation — is the computational language in which all of general relativity is written.