Some people use basic bike trainers for practice before triathlons or other cycling races, whereas others tend to use it as a substitute for riding outside if the weather is unfavorable. Either way, a bike trainer can provide a high quality workout, and in many cases providers the rider with a more difficult and challenging ride, than riding outdoors.
A bike trainer is typically made up of a frame, a clamp with which the bike is held securely, a roller that is pressed up against the back wheel, and a mechanism (whichever sort it may be) that is used to provide resistance (the exception being a more expensive “direct-drive” version). The bike you plan to use is mounted onto the trainer so you can experience a workout comparable to an outdoor ride, just in a highly-controlled environment.