It would help if we knew what type of device you have. MY only experience with Android is with my current HTC Evo 4G. So, I had to figure this out recently. Basically, when you put in your facebook, twitter and gmail accounts, your phone auto-magically grabs all your friends and contacts from these sites and downloads them to your phone. Now if you open your contacts, you will see only the contacts you physically pit on your phone AND the contacts downloaded from your gmail account. AT the bottom of the screen, you will see 4 icons, which represent different screens with different options. Scroll to the third one, which should look like a globe, which represents your "ONLINE CONTACTS". tap the online directory of your choice and it will bring up your online contacts from the corresponding online service. If the phone finds a contact in your online database that is "very similar" to a contact in your gmail or phone directory, a link option is available to link the two contacts together.
For example, say I have a cousin named William Rufus and his contact info is stored in my phone or gmail account. Now, William is also a friend on my facebook account under the handle "Billy Boy". So, now I have a contact named Billy Boy on my phone's online directory and a contact named WIlliam Rufus in my phone's main directory, even though these are the same person. Since the two will likely have similar email addresses, the phone will give you the option to link the two contacts together. By choosing to do so, the phone will automatically sync the data together on my main contact list, so the next time I view the contact on my phone, I can see his stautus updates and his profile picture.
A lot of times, the phone may not recognize that two contacts should be linked, in which case, you manually do it. Or, the phone may incorrectly assume that two contacts should be linked when they shouldn't. In this case, there is an option to remove the syncing option.
As I said before, this is the way it works on my Evo. I don't know if your device behaves in the same manner.