Windows 10 lacks factory software for playing DVD's, in order to play them you need to install software separately. If the issue persists with CD's, then you may want to update your drivers.
I personally use VLC for playing DVD's, but there are around 50 options that you can find on Google.
matterny is right on this. And by the way welcome to the forum
Microsoft removed the DVD player app in Win10, so if you want to get the W10 version of Windows Media Player that supports DVD players (music & movies), you have to login to Win10 with a Microsoft account (Microsoft LiveID, or Outlook.com) and go to the Microsoft App Store and download the player-it costs you $14.99 one time fee. There are other players, but since there are millions of DVD movies on disc out there, many won't play without proprietary software even on the free Media players such as VLC. I know, I tried it on a Client laptop. no-go there. This also applies to DRM copy protected Music CDs too. My client downloaded a non-Microsoft DVD media player app, but it cost her the same $14.99 that MS charges! But at least she can now play most of her Music CDs.
Being one of the 5 million or so Win10 Insider Testers, also known as Beta testers, many of us asked Microsoft about why they did this and we didn't get a clear answer. However, on the Insider Hub which is an online forum community of all the Beta testers global wide the generally accepted answer is that Microsoft intends to do away with DVD drives completely in the future. They see things like their Surface laptop, tablets, and Smartphones as no longer needing that clunky and heavy device in mobile computers, or even in the desktop PCs of the future. Everything is moving toward solid-state storage. This trend is clearly seen with digital flash drives, digital memory cards, and even digital hard drives such as SSD's.