"install/upgrade.php" looks within the "LANGUAGE_CHANGES.txt" file for "CHANGED", "NEW", "REMOVED" line items.
There is also "DELETED", for removing the whole language file -- very rare.
Looking at this single line within LANGUAGE_CHANGES.txt, just for example:
CHANGED - Changed Language Strings
1. The upgrade file will look at the version: VERSION-7.5.9
2. It will take the COMMAND of: CHANGED
3. It will look in this FILE: addpost.php
4. For this KEY: $ubbt_lang['POST_ICON']
5. And will rename whatever VALUE is currently there, to this: "Post Icon"
NEW - New Language Strings
If COMMAND = "NEW", the line will be added to the end of the language FILE
REMOVED - Removed Language Strings
If COMMAND = "REMOVED", then it the FILE will be searched for that KEY and will remove just that line.
DELETED - Remove Language Files
This will delete the whole language file. It cleans up files that are no longer used. Its very rare that this option is ever used, but it does get used.
Within the upgrade process, there are two button options given when you reach the language upgrade steps.
option 1 - "Update my language files"
this will automatically do everything for you. If you have custom modifications within your language files, its recommended to update them yourself, and choose option 2
option 2 - "I have updated my language files by hand"
This will bypass the language file updater, allowing you to use a program such as, "BeyondCompare" to compare and manually update your current language files with the new ones from the /languages/english/ directory.