Does rebooting the computer erases all the data on the computer?
No, simply rebooting your computer (turning it off, then on again) does not erase all the data on the computer. However, you can lose unsaved data on files that you are currently working on if you don't save. Reformatting (reinstalling your operating system) will erase all the data on your computer and set it back to its default settings.