It's basically a URI that contains the torrent hash enabling a client to find peers through a decentralized network such as DHT instead of requiring a tracker. I believe you can append trackers and other info to the URI as well, but I'm not sure about that.
The other two comments are (correctly) describing what a magnet link is in the sense of its implementation. On the off chance that you wanted a more abstract/basic description, a magnet link is defined by what you're linking to, as opposed to where it is.
This is kind of cool, because a file can change locations (how many times have you seen a dead link/File Not Found?), and with a magnet link, if you have a file that matches the description, you can be reasonably certain that you've found the right file (unlike the URIs you're familiar with, which can change the content stored at each location). On the flip side, actually finding the file from the description is a bit more complicated, but as you can see, it's still pretty easy for the user when implemented correctly.
It's better for TPB, because they're no longer telling you 'where' the file is, just what it 'looks' like. Legally, I'm sure that makes some difference.
AFAIK, it's a torrent for a torrent; a DHT implementation. The URI for the magnet link has all the information it needs to find peers and start downloading the data, the first datum of which is the torrent file.
But when I click on the magnets things seem to download immediately. So looks like you built something pretty amazing. Congrats!