With iOS 7 and OS X Mavericks, Apple introduced a new feature called iCloud Keychain. The feature aims to help keep your online accounts more secure, and at the same time speed up the amount of time it takes you to enter your log-in credentials on certain sites.
In an effort to help you keep accounts secure, Apple helps create account passwords when you're setting up a new account or changing a current account password in Safari. The password is saved to your iCloud account, retrievable by another Apple device with iCloud Keychain enabled.
Should you need the password to sign in to an account from a device not connected to your iCloud account, it can be frustrating, as the method to retrieve your password isn't obvious.
Getting your password is easy, however, once you know where to look. On your iDevice, launch the Settings app go to Safari > Passwords & Autofill > Saved Passwords.
There you'll find a list of all the log-in credentials and passwords you have saved to your iCloud Keychain. Tapping on an entry will show you the user name and password (after entering your device password) for the respective account. You can copy any of the information listed with a long press on the text field.