What I want to know is if both b2-static and dynamic bodies have automatic collision detection.
And how do I tell box2D what it should do when it collides with a specific body?
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
You should follow some tutorials as you are learning Box2D. Every body in Box2D has collision detection unless disabled. There are many way of checking collisions, here they're explained well:
Also do some research please, things like this can be easily found on Google or even here.