How can I fix cracks between the bathtub and the wall surround?
I'm not sure where some of those cracks came from, but it doesn't look like anything a good quality bathroom caulk won't fix.  Here is the big secret to caulking anything in the bathroom:

Clean those surfaces as good as you possibly can.  Like cleaner than you've ever cleaned anything in a bathroom.  After its super clean, clean it again with alcohol to make sure there is no residue at all.

Once it's clean, use a high quality silicone bathroom caulk (don't try to save a few bucks - you're buying one tube).  Let it dry properly before use and enjoy a leak free tub.