Is this problem something that has slowly developed, suddenly appeared, or has the machine never functioned correctly?
Initially it sounds like a possible overheating problem, but might be other things as well. We'll assume at this stage that power-down or shut-off isn't set in Windows at 10 minutes!
Open the case and check to see if the CPU heatsink fan is turning, and that the heatsink isn't bunged up with accumulated dust and dirt.
Clear out any dust and dirt, preferably with say a can of compressed air etc. Vacuum cleaner nozzles are prone to have a nice big static charge so avoid using if possible.
Many modern computer BIOSs have a section headed Power, then a sub-menu called Hardware Monitor. or something similar. This will often give details regarding CPU temperature. Report back with this temperature.
If after clearing out dust and making sure the CPU fan is turning ok, the machine still switches off, then maybe the heatsink/fan assembly is not fitted correctly. With the power off, remove the assembly. Carefully clean both mating surfaces, i.e. CPU and heatsink. Apply a thin coating of new heatsink compound, e.g. Artic Silver is a good one. Replace heatsink assembly, making sure any "step" (if it has one) on the heatsink is orientated correctly in relation to the CPU socket on the motherboard. Reconnect fan cable, and test.
ROGER - G0AOZ.