[verb た-form] + まま [verb ない-form] + まま [i-adj] + まま [na-adj] + な + まま [noun] + の + まま
まま says a state stays as it is while something else happens: the shoes stay on, the TV stays on, nothing gets eaten. After a verb, it takes the た-form for a state an action has left behind.
The verb is in the た-form even when the sentence is about the future: you put the shoes on before you come in.
After the ない-form, まま means the thing never got done, and the state of not having done it carries on.
A noun takes の, a な-adjective takes な, and an い-adjective goes straight on.
These go beyond a state that stays the same while something else happens.
With こ・そ・あ words, まま means "as things are" or "as it is". This is the form you will hear most.