How does extra damage work for critical hits?


I’m a bit confused on how extra damage works for critical hits. Let’s take the following example:

A thief with sneak attack rolls a crit. I’m under the impression he rolls double his normal attack dice AND double his sneak attack dice. Is this accurate?

Another example, I finished DM-ing my first campaign recently. The Giant Spider enemy monster has an melee attack that causes a constitution saving throw. If the player fails, the enemy rolls an additional 2D8 of damage. In this situation, if there was a critical hit, and the player failed their saving throw, would I also roll double dice on the additional damage? Or is that considered a separate attack?