This is the 763rd most frequent Icelandic word.
mánuðum
"Months" (dative plural form of "mánuður").
In this sentence, 'mánuðum' is the dative plural of 'mánuður' (month), used because it is governed by the preposition 'fyrir' which requires the dative case.
Við ferðumst til Keflavíkur fyrir nokkrum mánuðum.
We traveled to Keflavík a few months ago.
The word 'mánuðum' is dative plural as directed by the preposition 'eftir', which governs the dative case in this temporal sense.
Eftir nokkrum mánuðum byrjum við aftur í skóla.
In a few months, we will start school again.
Here, 'mánuðum' is in the dative plural form owing to its use with the preposition 'í' indicating duration (past or present).