A tractor beam is a focused field that lets a starship lock onto, tow, hold or repel another vessel or object.
Tractor beams project a directed graviton field that can pull a target toward the emitting ship, hold it in place or push it away. Starships use them to tow disabled craft, recover shuttles, move debris and capture fleeing vessels. Their pull is limited by the power available and the relative mass of the ships involved.
Early Earth starships lacked the technology. The NX-01 Enterprise relied on a mechanical grappler to retrieve objects, and tractor beams became standard aboard Starfleet ships only later.