It's pretty cryptic, isn't it. It's basically a dictionary but you can additionally check if a string is a prefix of a known key:
>>> t = Trie()
>>> t['they'] = 15
>>> 'the' in t
True
>>> print t['the']
None
There's also find_prefix, which will match as much of its argument as possible, and return the value it finds there (if any) plus the remainder of the argument:
>>> t.find_prefix("theirs")
(None, 'irs') # Prefix "the" has no value
You could take a look at the source in nltk/containers.py. The magic is in the methods __setitem__ and __getitem__, which handle expressions of the form t[key].
Also good to know: The keys() method will only return real entries, not prefixes. You can use it with the method subtrie to retrieve all words that begin with a given prefix:
>>> t.subtrie('th').keys()
['ey']
PS. Note that containers.py was removed from the NLTK about six months ago! Before you update your nltk distribution (which you should), save nltk/containers.py under a different name. Better yet, just save the Trie class. (The rest of the file is obsolete).