How does indoor tanning differ from being out in the sun?

Both expose your skin to UV radiation. 

Tanning beds use fluorescent bulbs that emit mostly UVA and smaller doses of UVB radiation. The amount of UVA radiation from a tanning bed is up to three times more intense than the UVA radiation in natural sunlight.

Tanning beds may be more dangerous than the sun because they can be used at the same high intensity every day of the year. With the sun, there is cloud cover, seasonal variation, and different levels of UV radiation that we are exposed to.