System Restore is a very useful tool. I do PC support and it has made me look like "super tech" many times.
First thought, go to the Device Manager, RIGHT click on the entry for your sound module (such as RealTek, IDT, Conexent or whatever you have) and then LEFT click "Uninstall". DO NOT check the box to also uninstall the drivers
. Then restart the PC and when Windows starts it will detect and reinstall the sound. This will reset the sound module and any corrupted status in Windows.
If that does not fix it, there could be some type of hardware problem that is causing the sound module not to switch back to the speakers. If the PC is still under warranty, contact the Vendor as they are the only ones that can correct it under warranty. All in one's are basically a Laptop PC with a desktop monitor and keyboard/mouse and thus everything is on the motherboard.