If you set a volume limit in Settings - Music, disable it.
Look at the settings for your side switch. If you chose to mute it, take a look at the switch itself. If you can see the red part below the switch, your iPad won't play sound, because it's muted. Toggle it to the other side to get sound again.
If you enabled orientation lock for the side switch, look at your Control Center. There should be a bell sign/button in the middle. If it's white and crossed out, tap it to enable sound again.
Here's something else you could try:
Reset all Settings in Settings - General - Reset. This will set back your settings to default, and you'll have to go through the Settings app to enable/disable what you prefer.
Maybe restoring will help. This will erase every content from your iPad, and hopefully also remove glitches you experience now. You can restore from a backup after restoring.
As it's an iPad 2, use iTunes (computer) to restore your device. Before restoring, make sure iTunes is up to date, and backup your iPad.
This might not help with your earbuds, but hopefully with the Sound problem on your iPad.