Generally speaking, in such case one would simply use a relay. A relay is exactly a "smart plug" without the smart part, basically a relay is a simple device that will flip a switch based on a command, that command can be simply to put a certain voltage to it's pin (most likely 3.3V or 5V when it comes to IOT). The command can also be via I2C, for instance with this relay you will have to use I2C to explain to the relay board which switch you want to flip.
So one would basically connect a relay to a Micro Controller Unit (MCU) with the necessary connectivity to receive the command and pass them to the relay.
I assume that you are also going to use some sensor and this kind of things.
There's two approach, either you buy each individual "smart" stuff ie sensors relays and so on which will include in each of them a MCU + one feature (for instance relays or sensor or electrovalve or whatever).
Or the most commonly use approach at least in R&D is to drive down the cost by using one or several MCU as needed (for instance ESP32 family) and using them as the base board for the sensors and relays and so on, you would use them to get data from the sensor using and switching outputs such as relays or electrovalves.
If for some reason you would be requiring more that one MCU then we would go with a "gateway" that will act as the brain of the operation. And that gateway board would control your slaves, and all your requests would go through it and the slaves will go through the gateway to get to you.
Usually this gateway board use a slightly bigger and easier to use processor for instance something running able to run Linux as IMX6, IMX8 or raspberry pi or something like that with the proper connectivity and servers one would need. You will choose this board for instance based on you criteria of connectivity, do you need ethernet? Bluetooth? Wifi? RF? GSM? Sigfox? RF? And then it's capacity to run what you will need it to run such as a REST Api, MQTT server, Socket server and so on.