The for loop passes strings like "10=October", with the double quotes, to the "do" part of the loop, the double quotes are important because for will split unquoted strings on "=;,<space><tab>".
%%~a takes the string like "10=October" and removes the double quotes. Batch Environment variables support string replacement (%var:str=rep% or !var:str=rep!), %%~a contains both the string and replacement. Since it's just a string replace you can see why 10,11 and 12 are done first.
Standard environment %variables% don't normally update in loops or if statements. The "call" and the doubled percentage signs (the for variable is unchanged) allow limited use of the variable, enough for the month change. Be aware the the call method won't work with all commands.
Instead of using "call" delayed expansion could be turned or an !'s used
..... set month_word=!month_word:%%~a!