Is there something like a power switch that I can control from a computer?
There is a whole world of home automation products that are designed to be computer controlled. Search for "Smart Switch" and you will be overwhelmed with choices and dismayed at the confusing array of options. 

Some can be controlled directly over WiFi, others require a "hub" which your computer talks to that then relays the command to the switch. 

Buying guides are strictly off-limits here at SE, and a tutorial on HA is way beyond my capabilities and what would fit into an answer box. However, just a little bit of searching will also help you find the various pieces of software available to control the switches and, in many cases, the APIs to allow you to write your own code to do so if that's what's necessary for your use case.