The answer to this question depends on the nature of the malware and the type of reset. Malware is more likely to survive a PC reset that only refreshes the system but keeps your personal files. It’s highly unlikely to survive a PC reset that formats your hard drive, though.
However, there are some types of malware, like rootkits, firmware malware, or BIOS malware, that can survive a hard drive format.