Almost all guitar amps today that are not all tube designs are meant to sound like all tube amps, so I will write about all tube amps and what they add to the sound with the understanding that even non tube amps will be essentially the same.
The part of an all tube guitar amp that has the greatest effect on the signal is actually the speaker. Guitar amp speakers typically only reproduce frequencies between about 150 to 5000 Hz. Most audio systems like headphones, home stereos, PAs, computer inputs and outputs, etc. will at least go from 80 to 16,000 Hz, and many devices go well beyond that. So a guitar amp speaker cuts off a lot of high frequencies and some low frequencies. The frequency response of a guitar amp speaker is also not flat, so some frequencies will emphasized over others. Finally, all speakers can be saturated if driven hard which causes compression and distortion.
Working backward through the signal chain, tube amps require output transformers to couple the power stage to the speaker. Transformers also saturate when driven hard so there's another source of compression and distortion. Transformers are also susceptible to eddy currents and other artifacts that add certain kinds of distortion to the signal. Tranformers are heavy and expensive and not high fidelity, so they are used rarely outside of musical instrument amps and high end studio sound processors.
The rest of a guitar amp can be more closely approximates with a pedal, although the particular sonic character of tube preamps and power amps can't be perfectly imitated by any other technology.
An amp simulator pedal will attempt to recreate all of those aspects of a full guitar amp. They sound very good these days and are used by professionals because they are more affordable, durable and convenient than real tube amps, even though they are not perfect sounding. Distortion pedals alone just add distortion and usually sound pretty terrible if they are not run through a guitar amp, in my opinion.