What affect how rigidbodies move, fall etc? The mesh or the collider?

I have never been needing to think about this earlier but when I started building a car game I began thinking more about this.

Is it the mesh or the collider that affects how a rigidbody rotates, moves and so on? How is the centre of mass calculated for example (I know it can be moved with scripting), does Unity calculate it by looking at the colliders or at the actual mesh.

So If I have a quad mesh that I use for a sprite in a 2D game will the actual height and width affect the physics even if the collider is smaller for example?

It always uses the collider.

Of course you could be using a mesh collider of the actual mesh, in which case the collider and the mesh will be the same thing, but as far as the physics is concerned, the collider is the only thing that exists.

The centre of mass is calculated from the collider or colliders if the main rigidbody object has children which also have colliders. The basic shape of the collider structure is also used to calculate the tensor of inertia, which basically determines how much the object resists rotation in each of the three axes. You can, however, set the centre of mass and the tensor yourself from a script. This is useful when the collider is not an enclosed volume (which renders the automatic calculation impossible) or when the object’s mass is unevenly distributed within its volume (eg, much of a car’s mass is concentrated in the engine while the large body section is mainly full of air).