How do I get multiple copies of the same portal key?
Before recent changes about portal key generation to own multiple keys of the same portal you had to drop the key of the aimed portal before hacking it. Then, you had chances to gain a second portal, grab the dropped key and you had two keys.
Now that portal keys are much rarest when hacking, you can gain a key even if you were already carrying the same portal key, but you'll have to be patient and persistent.
Note that sometimes, when making a big XMP blast on an enemy resonator, a portal can drop a portal key (his key or a key of the linked portal).
EDIT January 2014 : since a few weeks, if you already hold a portal key, you have nearly 0% of chances to get another one. To obtain a new key, drop the keys you own, then hack and you'll probably get a new key (~80%)
Wow, ok all these answers are super out of date.
Methods of obtaining multiple portal keys:
Method the first: Glyph Hacking
When you glyph hack, you can enter the More glyph into the Command Channel to request a key. This makes a key a potential hack reward irrespective of how many keys are currently in your inventory. Note that there is a chance that the portal will not give you a new key, just like if you hacked a portal with no key in your inventory.
Method the second: Putting Keys in Capsules
If you have a key inside a capsule (Blue Capsule/MUFG/Quantum/Key Capsule) you can hack another key from a portal. This works for both standard hacking or glyph hacking with or without entering the More glyph.
Method the third: Dropping keys
If you drop a key you are holding (so that there are no un-capsuled keys in your inventory), you can hack another key from the portal.
As a side note, if a portal fracker is applied, it will double the hack output for all items including keys, which means that you can get 2 keys from one hack.