The Magic Keyboard, Magic Mouse, and Magic Trackpad each have a built-in rechargeable battery.
Check the battery level. Click the Control Center icon Apple Lithium-ion Batteries.