A Rasberry Pi. The number of things you can do with these cheap computers is astronomical. You can have a Debian Linux computer and then learn networking, programming, run your own small website. Then start on hardware. Connect up various hardware devices, maybe starting with just a fan. Turn on. Turn off. A second monitor, larger disks. Webrtc. On an on. You never know what kinds of things kids will like. They may l…
In order to have a computer that can be completely understood, like one from 40 years ago, the best would be a development board for some Cortex-M microcontroller, e.g. one of the STM32 Discovery kits.
These are very cheap and have complete documentation, unlike a personal computer or a Raspberry Pi.
On such a development kit it is easy to learn anything that could be learned on an 80's computer.
There are 2 disadvantages when compared to the old computers, these development boards do not have manuals intended for newbies, so someone technically competent has to guide, at least in the beginning, whomever wants to experiment and learn with the kit, and secondly, the development kits are not stand-alone, you need a personal computer on which to compile the programs and load them on the kit.
Despite the 2 disadvantages, such a development kit with an ARM Cortex-M microcontroller is the best way to recreate the experience of an old computer.
Using the development kit for direct access to hardware can be combined with learning programming on the host computer, e.g. for GUI programs or games.