I won't go into how a relay works, as I know you don't care, just want to know how to wire it.
Almost all standard relays you buy, will look like this, and be numbered like the above picture.
30: Battery/Power Source
87: What ever you want to power, like FogLights
86: When you want to turn the relay on, you power this pin. So say your foglight switch would go to this one.
Whenever 86 gets power the relay will "turn on", so you'll probably want to use a switch in there so you can turn it off. If you can't turn it off somehow you might as well have wired it straight to the battery.
Here is a basic wiring diagram for a relay.
You can power the switch from pin 30 like you mentioned, however if you directly wire pin 86 and 30 together the relay will always be on.
This animation should show what gets power when:
With the switch off, only one side of the switch has power, and pin 30 has power (shown in yellow in the drawing).
When the switch is flipped, the other switch pin gets power, and powers pin 86, one 86 has power, the circuit is completed and pins 30 and 87 are connected directly inside the relay, the relay is now "on" and your accessory (a fog light in this case) should be on.
Also note the switches power doesn't have to come from pin 30, the switches power could come from any 12+ volt source. In the picture below the switches power comes from a power source that is only hot when the key is on, this way everything will shutoff when you turn the key off, wether you remember to flip the switch or not.
Now also note that you can switch the ground side as well. This has become my preferred method for hooking up relays actually. It means you only have to run one wire into the cab, then just ground the other side of the switch the closest piece of metal.