The iPhone maintains two separate Apple IDs: one for iCloud, and one for the iTunes Store. These may or may not be the same, and they are set in two separate places.
To view and set the Store account, open Settings and scroll down to Store. Beneath the settings for Automatic Downloads, it should show the Apple ID you're currently using on the phone for the Store, e.g.:
Apple ID: pito@mac.com
Tap that, and a dialog will pop up offering three options: View Apple ID, Sign Out, and iForgot (the last is for retrieving a forgotten password).
If the Apple ID displayed there is not what you expect, select Sign Out, and you will be able to sign into the Store with a different Apple ID. Note that this will not affect your iCloud settings, which are managed separately through Settings > iCloud.
Give this a try, and if you are still having troubles, feel free to update your question.
Further note: it sounds like you have inadvertently set up a new Apple ID instead of using an existing one. To identify which Apple IDs are associated with your account, check out My Apple ID. The Manage Your Account and "Not sure if you have an ID? Find out" links should help you get a handle on the situation.
Update: Regarding your comment about the App Stores, there's definitely confusion to be had here: The "App Store" on iOS is part of the iTunes Store - it's the same content that you see when you open iTunes, go to the Store, and browse to Apps, and it uses the same iTunes Account. The Mac App Store, accessed by clicking the App Store icon in your Dock (or under the Apple menu) in OS X is a separate content store containing only OS X apps. That said, it also authenticates using an iTunes Store account, typically the same one you'll use in iTunes.
As of today, the easiest way I've found to think about this - and the way I've configured my own accounts - is:
An Apple ID for buying things, which you'll use to authenticate in:
- The iTunes Store
- The App Store on iOS
- The Mac App Store on OS X
And one for syncing things, which you'll use to authenticate in:
- The iCloud settings on iOS
- The iCloud preference pane on OS X
- The iCloud website
The thing to note about the above is that you can use the same Apple ID for both sets of tasks, but, depending on what you want to accomplish, knowing where to enter each ID is important.
If you change your account's password using your Mac OS X Install disc (or if your network-based account password is changed due to a network admin forcing a password change), your default keychain password (which uses the same initial password as your user account) does not change.
Support Apple helps:
If you want your default keychain to be unlocked automatically when you log in, synchronize your Keychain Access and account login passwords by doing this:
- Open
Keychain Access
(you can get to it by choosing Utilities from the Go menu in the Finder).
- From the
Edit menu
, choose Change Password for Keychain "login."
- Type the former password of the account that you are currently logged in to, then click OK.
- If you entered the correct password, a new window appears; enter the original password again in the
Current Password
field.
- In the
New Password
field, type the password that matches your current account password.
- Re-enter the newer password in the
Verify
field, then click OK.
If you don't remember your original (former) account password
If you don't remember your original password, you'll need to delete the keychain. Deleting a keychain also deletes all the password data saved in that keychain.
- In
Keychain Access.app
, choose Preferences
from the Keychain Access menu.
- If available, click the
Reset My Default Keychain
button. This will remove the login keychain and create a new one with the password provided.
- If
Reset My Default Keychain
is not available, choose Keychain List
from the Edit menu.
- Delete the "login" keychain.
The next time you log in to the account, you can save your current password in a keychain.
If the above fails or doesn't fit:
- Open
Keychain Access.app
- Select the
"login" keychain
from the keychains list
- Click the lock at the top to lock the
"login" keychain
- Click the lock again to unlock the login
- After entering your
"login" keychain
password you should be presented with a dialog
- Clicking the reset button will re-sync your
"login" keychain
password with the iCloud keychain password.
Info: Discussions Apple
If everything from the above fails for whatever reason the last resort you can do is the following:
- Quit all running Applications
- In Finder
Select Go > Go to folder
(⇧⌘G)
- In the window that appears, type the following:
~/Library/Keychains/
- Click OK.
- Look for a folder with a random name similar to this "A8F5E7B8-CEC1-4479-A7DF-F23CB076C8B8". Note: Each folder has a unique number.
- Move this folder to the Trash.
- Immediately choose
Apple Menu () > Restart…
to restart your Mac.
Info: Support Apple
Best Answer
Apple send this email to all iCloud users:
From 2017-06-15 you are required to use app-specific passwords for third party apps.
Generate an app-specific password
After you generate your app-specific password, enter or paste it into the password field of the app as you would normally.
Manage app-specific passwords
You can have up to 25 active app-specific passwords at any given time. If you need to, you can revoke passwords individually or all at once.
After you revoke a password, the app using that password will be signed out of your account until you generate a new password and sign in again.
Any time you change or reset your primary Apple ID password, all of your app-specific passwords are revoked automatically to protect the security of your account. You'll need to generate new app-specific passwords for any apps that you want to continue using.