It's real simple.
When you play, and find items, you can create codes for them by asking Nook. You'll give him the name and town name of whoever you want to trade with, he gives you a long, annoying NES-style password (GODDAMN I THOUGHT WE'D KILLED THESE) which you write down and then give to your friends. Pretty innovative really.
This would have been much cooler as a networked game though, and needs keyboard support too.