You have not said how old your house is, what normal water line life in your area is, whether it is leaking under the foundation or under the yard, etc. Cost depends a great deal on length of run, depth to dig to get below frost line, whether excavation will be through trees or other obstructions or open area, whether ground along route is too steep for a backhoe to work on, etc.
The first thing you really need to figure out is whether this is a spot repair issue, or a total line replacement issue. Your plumber should be able to help with that determination. Very general rule of thumb - very old line from before 80's, if galvanized pipe, could be at its practical life and be ready for total replacement. Copper line generally last about 50-70 years UNLESS in a corrosive soil environment or if it has groundwater flowing actively past it, then can be 20-30 years. Plastic lines from the 60's to 80's vary a lot - from as little as 10 years to 50 plus dependingon brand. Plastic lines (PVC, HDPE, PE) from the 80's and later are expected to last 50-100 years - most have not failed yet, so no good handle on how long they will last.
An above-ground or under the slab line a plumber will do. Buried line outside he generally subcontracts to an excavator to dig and backfill the line, or asks you to get the excavation done.
If section needing replacement is under your floor slab or foundation, then a full replacement can be many thousands of $ depending on how many linear feet, and if interior flooring will have to be replaced or if you are on a bare concrete slab or bringing the new line in above-ground once you get through the foundation. A simple one-spot buried pipe repair (based on acoustic locating and precisely measuring the location of the problem) can be as little as $400 but probably more often $1000 or so - more if poor access like under a slab underneath stairs.
If the runs to be replaced are exposed in a crawl space or basement than it can run as little as $20/LF (probably $400 minimum job cost) to replace.
Outside line to the street can run from as little as $10/LF in areas where the pipe is shallow (no annual frost penetration) and in easy digging soil, to $250/LF or more if deeply buried, have to excavate through trees and heavy roots or boulders, steep topography, other utility interferences etc. Generally not more than $50/LF. Commonly, instead of digging up the old line, they select a new semi-parallel route from a good connection point for you existing interior water lines at the foundation (maybe not where it currently comes in, depoending on access) to the street main shutoff valve (called a "key box", taking a route between them that is easiest to get a backhoe into and minimizes destruction of valuable plantings or trees. A number of $50/LF is commonly tossed around as "normal" for this type of job, if exceeding 100 feet or so and digging and access conditions are normal.
If your connection is in the middle of the street rather than along your side in the yard, that can easily add $2-5,000 to the job, as the water utility usually has to do that part, and repair the street afterwards. In a major throughway street, even more because of traffic control, multi-agency permits, etc.
As always, find 2-3 responsible, well-recommended (Anglie's List ?) contractors, and then get bids. The route I would go is first go with your regular plumber to locate the leak (probably acoustically, by listening for the leak) and determine the scope of work needed, then if major, go for multiple bids.