dnd 5e – Does the multiclass effect in exp / leveling up?

My understanding of the multiclass system is a bit vague, so I wanted to clarify. If I had to use multiclass to level up and increase my general level, how is the experience dispersed between classes? For example, if I said, a level 3 fighter, then I took another class, this would take my general level to 4.

Does each class work individually in terms of exp? That is to say. You may need 3000 exp to level up from level 3, but only 1000 exp to level up from level 1.

Or does it work in a general sense? A level 3 character (multiclass or not) requires 3000 exp to level up to level 4, and then you can choose how to spend the level.