A codec (compressor/decompressor) is a method for encoding digital media. If the media you want to play was encoded with codec 'XYZ' then your media player has to support codec 'XYZ' in order to play that media.
The problem is that there are hundreds of different codecs, and no media player can support them all. In addition, many codecs are proprietary, so the people who create media players have to pay a licensing fee to the owner of the codec, which adds to the cost of their project. Developers want to avoid paying license fees, so they may not support proprietary codecs.
In your case, you have to try different media players until you find one that supports the codec that was used with the media you want to play. Some media players are known to support a lot of codecs, and one of these is VLC Media Player, which is popular and safe to use IF you get it from the developer. Here is their address: https://www.videolan.org/
Another method that some people use to add codecs to their media player is to install a "codec pack" but this is dangerous and can be illegal. You don't want to do it! You don't know where those codecs come from - some may be unofficial, or stolen or older versions.