I posted an answer here that answers your question on average cost. Then there's a second cost to register your chip on a national database, either the AKC (HomeAgain) or PetTrac (AVID).
Microchip Question
As to process, yeah, what everyone said. Just a big needle, a chip about the size of a rice grain is inserted between the shoulder blades, just like they're getting vaccinated. You can find out the exact info at these sites.
Home Again website
AVID website
These are the only 2 widely used in the US at the moment, your vet is going to have one or the other. Most shelters and vets have universal readers, but check anyway what's more popular in your aread. Vets' costs vary widely, but the method and program is exactly the same, you're not getting anything special the more expensive the cost.