As with any corroded bolts, give the heads a good clean with a wire brush (to make sure the correct size of socket locates properly) If you don't have to do the job straight away, spray penetrating oil generously all over the bolts and leave for 24 hours to soak in, but if you can't wait that long, do it anyway.
Then make sure you have the correct size of socket, and depending on how much access you have, use that socket in combination with an extension to allow you to turn the bolt with a breaker bar (a long handle bar instead of ratchet wrench) The trick is to first apply pressure clockwise to tighten, yes, tighten the bolt a fraction to break the corrosion, then turn counter clockwise to undo.
The important part is to use the correct size of socket and ensure it is fully located to avoid rounding off the bolt head.
Usual safety rules must apply if you're working under car, make sure car is well supported, use eye protection and disconnect battery before you work on starter motor.
Rupert
December 2019