I have an apple account and I have downloaded Xcode on my Mac. If I download Xcode on my friend's Mac because he doesn't have an account yet and he would be on the iOS program later, would he be able to upload his app (saying he downloaded Xcode with my account and he now has an apple account)? Should he download Xcode again (with his account)?
Your friend will be fine. The account used to download Xcode is in no way connected to your iTunes connect account, which is what is used to upload your app later. Xcode prompts for login information where appropriate, so your friend has nothing to worry about. There's no need to download it again later.
You don't have to download Xcode with the same ID as the one used to submit applications to Apple. They are distinct IDs.
The Apple developer ID is in no way linked to the app store consumer ID (Apple ID). And you cannot use the Apple Developer ID on the App Store or the Apple ID on the Developers portal. But you can create both using the same e-mail address.
You will use the Apple ID on the Mac App Store to download the latest release version of Xcode 4.3. It will will only be required to update said Xcode.
Note: You can create an Apple ID without a credit card as noted in this answer.
When using Xcode you might need to use your Apple developer ID (free) to download additional resources (documentation, support for anterior iOS versions/SDKs, command line tools)...
You can register for an Apple developer ID here for free.
To submit apps you need your Apple developer ID, which you will use to enroll to one or both Developer Programs:
- Mac Developer Program ($99/year) for distribution on the Mac App Store
- iOS Developer Program ($99/year) to distribute your apps on the iOS App Store.
These programs will also give you access to additional resources and beta versions of OS X, iOS, tools and SDKs. For beta versions of Xcode and beta frameworks you need to use you apple developer ID to download the DMG with the beta version directly from the developers portal.