Once your phone or computer has joined a Wi-Fi network, the password stays saved on the device. If you need to connect a new phone, a guest's device or a smart TV and cannot remember the password, you can read it from that saved entry; on Windows, Android, iPhone, iPad and Mac it takes a few taps and your screen lock code or administrator account.
This guide is only for seeing the password of a network you are allowed to use, saved on your own device; it is not a way to get into someone else's network or to crack a password. If a device has never joined a network, there is no saved password on it. Below we go through the menu names and version differences for each operating system step by step.