It should go outside, to a spot that slopes away from the foundation, far enough that the water does not soak back to the footing and return to the pit. It should not go into the sewer. Rules differ by city, so check with yours. The Town of Mantua, for example, tells residents it is illegal to empty a sump pump into the sewer system, and that the water must go to a spot away from the foundation such as a dry well, creek, pond, or neighborhood drain (source). When the yard itself holds water, the pump is only half the fix. A French drain collects ground water in a gravel trench with perforated pipe and carries it away before it reaches the house.