This may be a really stupid question, but I am learning mechanics and
asked myself with this question:
There is no such think as a stupid question. Only stupid people who don't ask questions. That being said,
What exerts more force when it hits an object: a car driving at a
constant speed of 40mph, or the same car driving at a constant speed
of 30mph?
For the same car (meaning same mass) the car with the higher speed experiences the greater force when it hits an object if the stopping distance of the two cars is the same. To simplify things, let's say each car hits a fixed wall. The average force that each car experiences is based on the work energy theorem which states that the net work done on an object equals its kinetic energy. Assuming each car is brought to a stop, that means
$$F_{ave}d=-\frac{mv^2}{2}$$
where $F_{ave}$ is the average force experienced by the car, $d$ is its stopping distance, $m$ is its mass, $v$ is its velocity just prior to to when the car hits the object. So, all other things being equal, the car at the higher speed experiences a greater force, as you would expect.
If F=ma, then surely the force is always 0, but then the force with
which the car hits an object when it crashes is the same no matter
what the speed is, as long as it was going at a constant speed?
Yes, if the car is going at constant speed the net force on the car is zero. But when the car crashes it decelerates. That requires an net force to reduce its speed and that work be done to take away the kinetic energy it had before the crash.
But this makes no sense because you will obviously feel a bigger force
hit you if the car is faster...
Yes your gut feeling is correct. And the reason it will feel a bigger force is due to the work-energy theorem I described above. The greater the kinetic energy (velocity of the same mass car) before impact, the greater the stopping force given the same stopping distance.
Hope this helps.