Other answers are correct regarding the operation of a relay, but I'll try to address the potentiel XY problem.
When switching a main power line, there is a lot of safety issues that need to be taken into consideration and the best approach depends on the load you're trying to switch.
Switching an electrical appliance or an outlet
For switching a standard appliance (<15 Amp) you could use a relay (with the correct ratings), an overcurrent protection (e.g. a fuse to protect the relay), a control circuit (to drive the relay), a power supply (for the control circuit) and a way to isolate the control signal from the main voltage (either a wireless controller or an isolation circuit based on optocouplers if you want a control wire). All of that needs to be fitted inside a double insulated enclosure to ensure the safety of users.
Instead of building that yourself, you could simply use a $20 smart plug and focus on the logic part of your project (those plugs usually uses the ZigBee protocol or even Wifi so you can easily drive then from a microcontroller/arduino/raspberry pi).
Switching a whole circuit
If you need to switch an entire circuit, you can use the same approach as for a single outlet with a major caveat : you are not building an electrical appliance anymore, you are modifying the electrical installation of the building. Since your device (relay+control circuit) would now be part of the electrical installation, it would need to be certified to conform to your local electrical code.
This most definitely eliminate any possibility of a DIY solution if you want to conform to code. In any case, you should use an out-of-the-box relay module designed and certified to be put in a distribution board.
Switching the main power supply
Since the main supply is also part of the electrical installation, the same regulation considerations apply here as well.
But switching the main power supply of an entire installation involve working with a lot more current (at least 60A but usually 100A-200A for a 110/120V installation). Working with that amount of current implies a lot of new things to worry about, including arc suppression. Your device would need a way to safely contains and extinguish those arcs in order not to stay stuck in a close position, burn-out or fail prematurely.
There are out-of-the-box relay modules able to handle large amount of current but their price increase exponentially with the amount of current they are rated for. I you don't really need the responsiveness of a relay (usually <10ms), there are other electro-mechanical solutions more suited for switching that amount of current. They usually consists of a motorisation on top of a mechanical circuit breaker which is slow (between 500ms and a few seconds) but a lot easier to implement than a relay.