A hardware engineer will focus on the physical components and settings. They would research, test, design, and build computer systems, processors, circuit boards, etc. Whereas a software engineer focuses more on the virtual aspects, such as the operating system and applications that sit on top of the hardware.
Think of a smartphone... the hardware engineer would test, design, and build the device itself and the components. The software engineer would design the social media, texting, games, operating system, etc.
I found this neat graphic that compares the two: