stress–energy tensor
The stress–energy tensor, written T, is the source of gravity in general relativity. It is the right-hand side of the field equations, the object that tells spacetime how much to curve. Where Newton used mass alone as the source of gravity, Einstein found that you must bundle together energy density, momentum, pressure, and internal stresses, because all of them gravitate.
You can picture it as a compact ledger that, at every point in spacetime, records how much energy sits there, how that energy is flowing, and how much pressure and shear the material is exerting. A box of hot gas, a beam of light, a stretched rope, and a spinning fluid all contribute different entries. This is why pressure itself gravitates in general relativity, a feature that matters inside stars and for the universe as a whole.
Because energy and mass are equivalent, light and even pure pressure bend spacetime, not just lumps of matter. The fact that pressure adds to gravity has dramatic consequences: it is part of why very dense neutron stars can collapse into black holes, since the very pressure trying to hold them up also deepens the gravity crushing them. The tensor must obey strict conservation laws, which in turn constrain how matter can move.
The simplest source — pressureless 'dust' of density ρ moving with four-velocity u.
In standard general relativity dark energy is not part of T but is moved to the geometry side as the cosmological constant; what counts as 'source' versus 'geometry' is partly a matter of convention.