There are two types of commonly available transmission services.
One is what I call a "spill 'n fill". They drop the pan, change the filter, and put it all back together with new fluid. This doesn't do much for cleaning, and changes about 30% of the fluid, on most transmissions.
Then there is a flush. This usually involves adding a cleaner, letting the engine run so that the cleaner circulates, then changing the fluid, and adding a conditioner, that helps the seals stay flexible instead of getting dry and hard. Most guys, myself included, will dump the conditioner into the flush machine's tank along with the new fluid to make sure it gets mixed in good. A flush will get between 75 and 95% of the old fluid out.
Then there are multiple types of flushes too.
There are dipstick tube flushes, which basically you stick a tube down the dipstick tube and the machine will suck out as much fluid as it can get, usually about 1/3 of the transmission's capacity, replace it with new, then you start the engine and it will alternate pulling fluid out and putting it back in, about two quarts at a time, until the rest of the fluid that was put in the machine is used up. This is mostly a dilution method, but it is effective. It is also a good method if lack of prior regular maintenance concerns you as it is also gentle.
Then there is a procedure called a "triple flush". It is basically the same as the dipstick tube flush, but it involves dropping the pan three time. Much more of a pain, no real added benefits except that you generally change the filter on the last round.
Then there is the in-line flush. You take the flush machine and use some adapter pieces to plumb the machine in line with one of the cooler lines. Then one of a few different methods (pressure diaphragms, compressed air, electric pump, or the transmission's own pump) is used to pump new fluid into the trans through the cooler line, and as that goes in it pushed the old stuff out. This is by far the most effective as it gets directly at most of the passages. It is also the most likely of all of them to exacerbate and existing condition inside the transmission as it does have the potential for putting pressure on the internal seals in an unusual manner. In 10 years though the biggest issue I have ever had after doing an in line flush was that the trans slipped because I didn't get the fluid level right, left it about a quart low. That was easy enough to fix, I just added a quart.
Also, keep in mind that not every shop will have a machine that does all of these kinds of flushes.
Average cost is going to vary. Most shops will charge you for 12 quarts of new fluid, the flush kit, which is your cleaner and conditioner, and an hour of labor. The price of all of those will vary by brand, location, shop type (a mom and pop shop will charge less than a dealership). Last shop I was at I think we charged about $183 for a transmission service.