Due to legal reason, Ubuntu does not have the multimedia codecs pre-installed, though they are available in the main repositories.
Besides installing other media players, e.g., VLC, MPV, you can run single command to install all required codecs.
1. Open terminal either by pressing Ctrl+Alt+T on keyboard or by searching for ‘terminal’ from system application menu.
2. When terminal opens, run command:
sudo apt install ubuntu-restricted-extras
Type your password, no asterisk feedback, and hit Enter. For Lubuntu or Kubuntu, you may use lubuntu-restricted-extras or kubuntu-restricted-extras instead in the code.
The command will install audio, video codecs as well as Microsoft TrueType core fonts and library to handle RAR archive in your system.