"I waited for three hours."
まちました (machimashita) is the polite past tense form of 待つ (まつ, to wait). まった is the informal past tense of this verb. As for ました (mashita), that is just the polite past tense conjugation of a verb. (書きました kakimashita, 食べました tabemashita). I'm certain there is no verb such as ました.
I don't know if duo explained this in the tips and notes as web version wasn't available last time I checked, but to form the polite version of a verb in present tense, change the last u to an i, then add masu. Examples Wakaru... Wakarimasu Hanasu... Hanashimasu Yomu... Yomimasu Matsu... Machimasu
Obviously you have to take into account that tsu becomes chi, and su becomes shi.
For verbs ending iru or eru (with some exceptions) just remove the last ru and add masu. Taberu... Tabemasu Miru... Mimasu
Then there are irregulars, like kuru becomes kimasu, suru becomes shimasu. For past tense, just use mashita instead. Hope this helped :)