Geodesics are the shortest paths between two points in a curved space, generalizing the concept of a straight line in Euclidean geometry to more complex surfaces and spacetimes. They play a crucial role in general relativity, where they describe the motion of objects under the influence of gravity without any other forces acting on them.