When a regular file has its SUID permission set, whoever accesses the file will have the same privileges as the user of the file.
To demo this, let's say that Maggie, a regular, unprivileged user, wants to change her own password. Since it's her own password, she would just use the one-word passwd command, without using sudo:
[maggie@localhost ~]$ passwd
Changing password for user maggie.
Changing password for maggie.
(current) UNIX password:
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[maggie@localhost ~]$
To change a password, a person has to make changes to the /etc/shadow file. On my CentOS machine, the shadow file's permissions look like this:
[donnie@localhost etc]$ ls -l shadow
----------. 1 root root 840 Nov 6 19:37 shadow
[donnie@localhost etc]$
On an Ubuntu machine, they look like...