The use of tractor beams was generally restricted to sublight velocities. However, tractor beams could be safely used to tow objects at warp speed, but only if both vessels were traveling at exactly the same speed. Because of the risk involved when engaging tractor beams at warp, Federation starships restricted its use. (TNG episodes: "Final Mission", "The Emissary")
However in 2266, the First Federation vessel Fesarius was able to tow the USS Enterprise at high warp for prolonged periods without stressing the hull of the Enterprise. (TOS episode: "The Corbomite Maneuver") In 2374, a Borg cube was able to tow the USS Voyager for some distance while traveling at high-warp velocity. (VOY episode: "Scorpion, Part II")
By the 24th century, most Federation starships were equipped with a tractor beam emitter on the aft ventral hull, as it was the best location for towing objects. Secondary emitters were also placed in other locations. Smaller tractor beams are installed within shuttlebays to assist in docking and landing maneuvers. (TNG episode: "Time Squared"). The Romulan Tal Shiar were using stand alone cloaking tractor beams. (ST video game - Carraya System Patrol mission)
A carefully modulated tractor beam can be used to affect ship-to-ship weaponry. In 2372, Lieutenant Commander Worf of the USS Defiant suggested using such a beam against a Vor'cha-class attack cruiser. When put into practice his plan was successful, deflecting some of the vessel's disruptor fire and reducing its effectiveness by fifty percent. (DS9 episode: "The Way of the Warrior")
Tractor beams may also be used in pressor mode, to push an object instead of pulling it. The USS Titan used this in an attempt to push an asteroid off of its course towards the planet Droplet. (TTN novel: Over a Torrent Sea)
Tractor beams had started being used by Starfleet by the year 2159, when the Enterprise (NX-01) was refitted and her grapplers were replaced by tractor beams. Shortly after the Enterprise left spacedock, the tractor beam was used to pull the USS Coto out of a protostellar nebula. (ST video game: Legacy).