When you go to the doctor and they put a little sticker on your head, that's called an EEG. It's like a special sticker that can read your brainwaves!
Now, when you go to the dentist or have surgery, you might be given medicine to make you sleep so you don't feel anything. That's called anesthesia.
Doctors can use the EEG sticker to make sure you're really sleeping and not feeling any pain during surgery. They can read your brainwaves and make sure they look different from when you're awake and feeling things.
It's kind of like a secret code that only doctors and special computers can read. They use the code to make sure you're comfortable and safe while you're asleep.