Relativity is a theory in physics developed by Albert Einstein that explains how space and time are interconnected. It consists of two main parts: special relativity and general relativity. Special relativity focuses on the behavior of objects moving at constant speeds, particularly those close to the speed of light, showing that time can slow down and lengths can contract for fast-moving objects.
General relativity expands on this by describing how gravity affects the fabric of space and time. It suggests that massive objects, like planets and stars, warp the space around them, causing other objects to move along curved paths, which we perceive as gravitational attraction.