Launch Services is an API used by applications to open other applications or their document files similar to the way that the Finder or the Dock handles them.
Using Launch Services, an application can perform such tasks as:
- Open (launch or activate) another application
- Open a document or a URL (uniform resource locator) in another application
- Identify the preferred application for opening a given document or URL
- Register information about the kinds of document files and URLs an application is capable of opening
- Obtain appropriate information for displaying a file or URL on the screen, such as its icon, display name, and kind string
- Maintain and update the contents of the Recent Items menu
Source: Apple's Launch Services Reference
Launch Services builds a database of all file types and their linked applications. Oftentimes this database becomes corrupted or full of duplicate items. This is most obvious when you right-click on a file and choose "Open With..." The database can be accessed through the lsregister command (man page). Running lsregister -kill -r -domain local -domain system -domain user will begin a rebuild of the Launch Services database (Source). Note that you will need to logout and log back in again for the changes to be applied (Source).