* Body-on-frame (BOF): In this older design, the body is a separate unit from the frame (a rigid structure of steel). The body is bolted or welded to the frame using body mounts – these are typically rubber bushings that isolate the body from vibrations and road noise coming from the frame. Think of it like a box (body) sitting on a separate platform (frame).
* Unibody (or unibody): This is the much more common construction method in modern cars. The body *is* the frame. The structure is a single, integrated unit where the body panels themselves provide the structural rigidity. There's no separate frame. The strength comes from carefully designed and reinforced sheet metal.
Therefore, there's no single answer to "how is the car body attached to the frame?" because it's only relevant for body-on-frame vehicles. For unibody vehicles, the concept of a separate frame doesn't exist.