Those twist-on connectors are called marrets(pronounced murets most places, lol), and are OK to use but can fall off and are not weather proof, once wires are twisted together put some silicone on them then install marret, that will help hold the marret and weather proof the connection.
Soldering and heat shrink is better and nicer to look at.
Mechanical relays come in many types, but all work on the same principal:
if you send power thru a coil of wire wrapped around a metal core, the metal core becomes a magnet.
Inside a relay there will be a coil/core and a metal arm held away from the coil by a spring.
Outside the relay there will be a minimum of 4 connectors, 2 of these are the for the coil.
When power is applied to the coil it becomes a magnet and pulls the metal arm down, when power to the coil is removed the spring pushes the metal arm away from the coil.
So we have an up and down movement on the metal arm, this is why it is called a mechanical relay, and why you hear a "click" when a relay is activated.
In a simple relay there will be a connector on the outside for the metal arm and for a contact point inside that the metal arm touches when it is pulled down, these two connections are the "load" connections, so 2 connections for the coil and 2 for the load.
The load connection is how a relay is rated, a 5amp relay has a large enough arm and contact point to handle 5amps of power passing thru, 10amp relay has larger arm and contact, 30amp even larger.
One of the largest relays on a car/truck is the starter Solenoid, it is a relay on steroids, lol, it works the same as the smaller relays, when key is turned to start, power is sent to Solenoid coil which pulls the contacts closed and the battery is connected directly to the starter motor and lots of amps flow thru.
I mention the solenoid because it is a good example of why relays are used instead of just a switch, after all a relay is just a switch and you need a switch to activate the relay so why double up on switches.
Without using a solenoid(relay) you would have to run that big red battery cable into the dashboard to a 200amp switch and then another big cable from the dashboard to the starter motor, and the cables would have to be even bigger because of the distance.
So relays are used so higher amp circuits can be activated without running large wires all over the vehicle.
They can also be used when you don't want to increase the amperage draw on an existing circuit.
Example of that would be if you wanted to add lights to a vehicle.
Wiring new lights to the existing lighting circuit could blow the fuse for that circuit, the circuits wire size and fuse are set for the number and watts/amps of the factory lights.
The current draw of a relay's coil is minimal, so connecting a relay's coil to an existing light's wire won't overtax the circuit.
Then connecting a new fused 12v wire to the relay's "arm" and the new lights 12v wire to the relay's "contact" will power the new lights when existing lights are turned on, without drawing power from the factory circuit.
Relays also come in multiple "load" configurations, there are still only 2 coil connections, that's the same on all relays.
The relays above are called STSP(single throw single pole), so basically an on/off switch for the load.
There are also DTSP(double throw single pole), these would have two contacts inside for the load, when relay is "off" the arm and 1 contact would be touching(A), when relay is "on" the arm would move to the other contact(B) disconnecting from A.
There would be 5 connectors on this type of relay, 2 for the coil, 1 for the arm and 1 each for A and B