Question: do critical hits apply to spells?
Answer: Note that this only refers to the attack - it doesn't say weapon attack, or anything else that would mean that this did not apply to spell attacks. When you get a critical hit with a spell attack, you roll all damage dice twice. So a critical hit with the cantrip Fire Bolt would deal 2d10 damage instead of 1d10.