Rather basic, I'm afraid, but when would you use a relay, and when would you use a transistor? In a relay the contacts wear out, so why are relays used at all?
Relays are on-off devices. Transistors can have their voltage drop varied.
Relays are far slower than transistors; typically 50ms to switch, and probably more. Some types of transistors can switch in picoseconds (almost 10 orders of magnitude faster.)
Relays are isolated. Transistors can be (e.g. SSR), but are often not.
Relays are electromagnetic and bring problems with them - for example, try building a relay computer with many relays. You will find that relays will interfere with each other in some cases. Transistors are not very EM sensitive. They do not emit much electromagnetic interference.
Relays consume a lot of current in the "on" state, most transistors do not.
Relays offer complete isolation between the activating circuit and the load.
They can switch AC and DC, and be activated by AC or DC.
They can be very robust.
They also have the advantage that one can often see if the device is actuated, and one can even hear the actuation in many cases.
Aside from all the correct properties that Leon mentions, relays also have a much lower internal resistance, in fact the switch of a relay looks quite a lot like a straight piece of wire.
Any other kind of solid state switch (bjt, scr, triac, igbt) will have some resistance and drop some voltage.
In many designs where switching is infrequent and the designer of the circuit doesn't know exactly what the user is going to want to switch, a relay is a nice choice as it will switch either ac or dc at a huge voltage and current range.
In a particular application you can almost always find a solid state component that will do the job cheaper than a relay, if you can do without all the robustness and versatility of a relay.
Relays are an ok choice for when the load that needs to be controlled draws more than a couple of amps, and when the switching will not be that frequent.
When you need to break (shut off) a current of several amps, load inductance can cause voltage spikes that will damage a transistor, unless you add a flyback/clamping diode to protect it. Relay contacts, being basically large pieces of metal, have much greater tolerance to this application, but even so, breaking large load currents will eventually burn out relay contacts.
If you need to switch something faster than once every second, a relay would probably have a relatively short life, and it would be worthwhile to go with the transistor option. If you don't need to switch your load faster than once every 10 seconds, you might find the relay more economical. As always, it's a design trade off.
Relays can be set up to activate so many different voltage levels without adjustment. This is why they are so often seen in industrial controls. For instance say I design a controller for a valve that requires switched +15V to work. Then the company switches the valve to a current controlled style where the output has nothing to do with a fixed voltage level. This is a simple change for a relay(really no change) and probably a complex one for a MosFET.