Where do you type in a code for Pokemon?

In your pal pad, if don't have one talk to the lady on the bottom floor in the Pokemon center, once you get it go on the wi-fi connection to get your code. Then go to register friends.