Sounds are an auditory output of the game intended to communicate the happening of certain events. Different objects like mobs, weapons or blocks have sounds.
On the Java edition of the game you can access your sounds from the game files by following these steps
Go to .minecraft/assets/indexes. The path to the .minecraft directory can vary depending on your operating system.
- Open the file titled with the version of the game you want to get the sounds from.
- Press ctrl/⌘+F and search for what you think that the sound could be called.
- After the path to the sound, it should say a hash value.
- Back in .minecraft/assets go to objects, and then the first 2 characters of the hash value.
- Open the file titled with the hash value using any application that can play .ogg files.