A service module (or equipment module) is a spacecraft compartment containing a variety of support systems used for spacecraft operations. Usually located in the uninhabited area of the spacecraft, the service module is jettisoned upon the completion of the mission, and usually burns up during atmospheric reentry. The service module is the equivalent to the spacecraft bus assembly on unmanned spacecraft.
Thermal control systems for proper heating and cooling of above systems.
While this would be used for a "baseline" service module, a service module may also be modified for additional functions. An example would be the equipment module on Gemini IX-A, when it was modified to carry the U.S. Air Force-developed Astronaut Maneuvering Unit that would have been tested by astronaut Eugene Cernan, but was cancelled when his spacesuit overheated, causing his visor to fog up. But the best example would be the final three Apollo missions, in which the J-series service modules included scientific instrument module (SIM) bays that took pictures and other readouts in lunar orbit. In addition to the film cameras, similar to those used on the Lunar Orbiter spacecraft and requiring the Command Module Pilot to perform a deep-space EVA during the return trip, two of the SIM bays, on Apollos 15 and 16, also launched a lunar "subsatellite" before the astronauts performed the Trans-Earth Injection burn with the onboard service propulsion system.
A unique inhabitable variation of the service module concept is the Functional Cargo Block developed for the Soviet TKS Transport Supply Spacecraft. In addition to full functionality of a service module, it featured a sizeable pressurized cargo bay, and a docking port - as opposed to its conventional location on the front of the re-entry capsule, which in case of the TKS instead possessed its own downscaled service module with de-orbiting thrusters, allowing the FGB to remain docked as an extension of the space station.
The Russian phrase for service module for the Soyuz spacecraft is sometimes more directly translated "Instrument-Assembly Compartment". This comes from the design feature of having the guidance and other computer systems in a separate pressure chamber (the instruments) from the rocket engines, their propellant tanks, and the life support tanks (from the German Aggregat, which gets translated "assembly"). The Russians use the term "module" (модуль) primarily in regards to elements of a modular space station, e.g. the Zvezda Service Module.