I've changed the title, if you don't mind.
I'm assuming you have Wi-Fi. If not, hen there's no real point in doing this. Anyway, you have to make a connection with Nintendo WFC so that you're assigned a Friend Code. Try accessing the Global Trade Station in a Pokemon Center. After making a connection, your Pal Pad should have three options, and the one Crono mentioned will give you your FC. If you really need blatant step-by-step instructions, just ask and I will edit this post.