A truss is a prefabricated piece of frame work that is installed at the site, but actually assembled somewhere else.
A rigid framework, as of wooden beams or metal bars, designed to support a structure, such as a roof.
A rafter on the other hand, is a single piece of wood, usually a 2x4, that is part of the supporting structure of a roof that is built on site.