In simple terms a codec is a bit of code that allows you to play a certain type of media file. Out of the box, most media players don't play them all, as you'll soon find out when you try to watch a movie in Windows Media Player and get a light show instead.
Way back in the day, when a program called Kazaa Lite was the coolest file sharing app around and people were downloading all manner of files they then couldn't play, the K-Lite codec pack came into being and remains the best and simplest way to ensure that your computer will play just about anything. The pack also comes with Media Player Classic bundled in, a free player that resembles the old Windows Media player before the skin designers got at it. It's fast and simple and it may not look as slick and shiny as WMP but it does the job really well.
There are several versions of the pack, but since speed and space are no longer big issues, you might as well download the full pack and let the classic player handle all the default formats. It's a simple, click-to-install procedure and you're done. Recommended as one of the essential apps to install when you do a fresh install of your operating system, too.