- "sound" is the key, under which you are looking for the value
soundEnabled is a boolean variable, which has some value - true or false; this value will be used as default value for soundEnabledPref in case there is no "sound" key; it can be written like that also:
boolean soundEnabledPref = sharedPref.getBoolean("sound", true);
If there is no "sound" key, soundEnabledPref will take the default value of true
A good practice for keys is to use constants - you WILL avoid simple typo errors later down the line, eg.:
public static final String KEY_SOUND = "sound";
Then
boolean soundEnabledPref = sharedPref.getBoolean(ClassNameWhereItsDefined.KEY_SOUND, true);