In most situations a company will come out and replace the spring with an entirely new spring. Even though there are some companies that will offer actual repairs on the broken spring, this is not recommended at all. Usually when springs break it is because the metal has become “weak.” Unfortunately metal will weaken over the course of time, especially when it is put under constant strain. A broken spring could be due to a multitude of reasons: weather, heavy usage, poor quality products, and etc. In this case, repairing it would be comparable to patching up a pair of worn out jeans. If you found a rip in your old tattered jeans, patching it to cover the rip might work, but eventually the jean will rip somewhere else. It could be the next day or even a month from now. But getting the item replaced entirely would avoid this (soon to be) problem.
If one spring breaks, we also recommend that you replace the second spring along with the one that broke. The reasoning behind this is that you want your springs to have the same amount of wear and tear on them. In many situations, when one spring breaks, the second one will break soon after. In the case that you have one broken spring and decide to only change one, if the second one breaks within the following days or month, this would cost you more money in the longrun. Consider the time you would save by doing it all at once. You would only pay for one service call (if there is one) and you would only have to take one day off from work. Also, in many cases, the garage door company will actually give you a discount for buying a set. By changing out two springs, you save time and money.