All equipment (eg your modem) has sockets (ie females). Wall plugs also have sockets.
Thus a male/male cable is the one you will normally use for connecting a piece of equipmemt to a wall socket.
Your mdem will therefore come with a male/male.
A male/female is only for extending an existing cable.
A single (ie direct male/male) is better than an extended cable - so use one of those in preference to buying an extension cable. If you can't buy one long enough, anf half-decent phone shop sould make you one - but get them to use top quality cable, rather than the standard poor quality phone cable.
Basically male/male is a really long version of what you have at the moment , this would be better. Male/Female is an extension cable to which one end goes into the wall and you plug in the other cable you already have at the other end, But all wires lose quality at connections, so I'd go for Male/Male