M is the Roman numeral for 1000, so MM is a thousand thousands, in other words a million.
I believe the M (in $100M) also isn't based in roman numerals but is a convenient dual meaning of Mega- (the metric 10^6 prefix) and the first letter of million.