Application's persisted data
The Library directory, located in the user's directory, helps to store data and preferences on behalf of applications.
While it has many directories, the ones that applications should use are as follows:
~/Library/Application\ Support/
~/Library/Caches
~/Library/Preferences
preferences
The Preferences directory stores lightweight user-preferences files related to a given program. They represent persisted user-specific settings. For example, com.apple.dock.plist stores the Dock settings.
ls ~/Library/Preferences/
com.microsoft.VSCode.plist
com.blizzard.diablo3.plist
com.apple.dock.plist
plutil -p ~/Library/Preferences/com.apple.dock.plist
application support
Application Support is the general purpose storage area where each application may persist arbitrary data, such as databases, downloaded content, or extensions.
caches
Caches stores cached data on behalf of applications. Those are usually artifacts produced by network fetches, which cache the network responses to keep them available across runs.