A solenoid is a type of electromagnet when the purpose is to generate a controlled magnetic field. If the purpose of the solenoid is instead to impede changes in the electric current, a solenoid can be more specifically classified as an inductor rather than an electromagnet.
A toroid is a coil of insulated or enameled wire wound on a donut-shaped form made of powdered iron. A toroid is used as an inductor in electronic circuits, especially at low frequencies where comparatively large inductances are necessary.