The purpose-built facility repaired friendly ground vehicles at a cost (proportional to the vehicle's damage) and remove terror drones, although the Allies could use an IFV with an engineer inside it to do the same at no extra cost. A service depot was also required to construct an MCV.
In a similar fashion, naval units could be repaired at the naval shipyard, although the amphibious transport could be repaired at the service depot as well. In both cases, repairs would stop if the commander runs out of resources.
In Red Alert 2, there was a glitch where any vehicle (except for the Amphibious Transport) that stopped on the Service Depot but wasn't given the order to enter the depot for repairs was instantly destroyed. This was not present in Yuri's Revenge.
In Red Alert 2 and Yuri's Revenge version 1.000, the Allied Service Depot was able to sell vehicles which were being repaired, but the Soviet one was not. Yuri's Revenge patch 1.001 disabled this ability. The ability was most likely a coding oversight, as the Allied service depot mostly inherited the code of the service depot from Tiberian Sun, and having a non-Yuri faction refunding units clashed with the idea of the grinder.