When the ending is "-en"?

The genitive plural ending is -en, when the root ends with a single vowel. You get the root from genitive singular by removing the last n.

katto - > katon -> kattojen

katu -> kadun -> katujen

Exceptions:

You drop the last e or i:

nainen -> naisen -> naisia

kysymys -> kysymyksen -> kysymyksiä

vuosi -> vuoden -> vuosia

uusi -> uusien -> uusia

When the ending is "-den/-tten?"

The genitive plural ending is -den or -tten, when the root ends with 2 vowels. You drop the first vowel and add i + den/tten. Threre's no difference between -den or -tten so you can use either one (they come from different dialects of Finnish, but they are both proper and neutral Finnish).

maa -> maan -> maiden / maitten

pää -> pään -> päiden / päitten

olut -> oluen -> oluiden / oluitten

Note, that it's the first vowel you are dropping. For example with the word "työ" you should drop "y", not "ö"

työ -> työn -> töiden / töitten

3rd possibility, "ten"

There are also a group of words, which can have -ten-ending. It's always attached after consonant.

kieli : kielen : kielien, but also kielten

nainen : naisen : naisien, but also naisten

kysymys : kysymyksen : kysymyksien but also kysymysten

Both forms are equally correct, but the last one is becoming more common in Finnish language.