I am interested in knowing what a device (like an iPhone) uses to remember and recognise my home wifi. Is it the IP address or something else? If anyone has an answer I would be really happy to see it, thanks.
It is the SSID you assigned to your home network. That along with the password allows it to connect only to your home network. If you use the same SSID and either leave it unsecured or use the same password as some other people it will connect to many different networks.
I am pretty sure it simply remembers the correct password to connect, and when it detects it it'll automatically input that password and connect to the router. That password is likely associated with the IP of the router (WAN IP that is not local).
It is the SSID you assigned to your home network. That along with the password allows it to connect only to your home network. If you use the same SSID and either leave it unsecured or use the same password as some other people it will connect to many different networks.