Spacecraft are subject to a range of thermal, pressure and acceleration variations, and the materials they are built from, primarily titanium, vanadium and sophisticated composites, must withstand these extremes without structural failure. In addition to being strong, spaceship materials must also be light, as the cost of lifting payloads into space is one of the major limiting factors on missions.
Titanium is, in many ways, an ideal material for spacecraft construction. It is strong, lightweight and tolerant of extreme variations in temperature and pressure. There are limits to what titanium can tolerate, however, and NASA has always been willing to use far more exotic materials in constructing its probes and crewed spacecraft.
Composite materials are popular choices for structural supports and fuselage panels. Composites, such as carbon fiber and Kevlar sheeting, can be synthesized to meet demanding standards and be tailored to the exact specifications of the component being built.
Aluminum is also a common component of secondary spacecraft systems. Like titanium, aluminum is light and strong, though not to the same extent. The external fuel tank used by the space shuttle is made mostly of aluminum, though it is not required to travel all the way into space with the shuttle.