AMGs feature handbuilt high performance engines and features not available on standard Mercedes vehicles. For example, mine has a handbuilt 5.4 liter V8, AMG monoblock wheels, aerodynamic bumpers/skirts, exhaust, intake, AMG exclusive two-tone perforated leather, unique woodgrain trim, instrument cluster, etc. The limited production and handbuilt nature of the cars make them significantly more expensive than a run of the mill Mercedes and they hold ther value a bit better than a non-AMG car.
There are also AMG packages that add little to a car other than styling/wheels. These aren't true AMG models... Remember - model style (E, C, S, etc) and three digits (230, 320, 500) is nomenclature for normal Benz. AMG nomenclature is model style and two digits (E55, S63, etc.)
AMG used to be an independent company was fully acquired by Mercedes Benz to sell against BMW M-Division.