Please read ALL of these, and you should then know a lot more than you know now. If you have more questions afterwards, I'm sure one of us will be happy to clarify further. They are pretty easily understood so even a layman shouldn't have trouble picking up on the concepts offered. For the most part, in areas where DDR3 is stated because it is an older article, you can just as well apply the concepts to DDR4 so long as you understand that the two are different.
https://www.tomshardware.com/reviews/ddr-dram-faq,4154.html
https://www.tomshardware.com/reviews/ddr-dram-myths,4155.html#p1
www.hardwaresecrets.com
And my memory guide, which deals more with configuration and testing.
In the beginning, there was......BIOS Before you go ANY further, go to the manufacturer product page for your specific motherboard model AND revision. Revision is an important aspect because for any given motherboard there may be more than one version of that model which will be identified...
forums.tomshardware.com
But to answer your main question about what I posted previously, current Intel platforms generally support memory speeds up to 2666mhz, by default. That means they will automatically detect and run at those speeds. AMD current Gen platforms will generally do so up to 3200mhz by default.
Both platforms however can run faster memory kits if you enable the XMP, A-XMP or D.O.C.P profiles in the BIOS, IF the motherboard is a motherboard based on a chipset that allows support past a certain speed. Not all of them do. Generally, AMD does on all it's boards but some boards will only supports certain speeds. This is generally listed on the motherboard product page specifications.
Intel generally only supports faster than the default speed on it's unlocked chipsets for the most part, which are the Z series motherboards. The rest of them, the business chipsets, the budget chipsets like the B series boards and the H series boards, only support up to whatever the default maximum is for that CPU with no XMP profile capability if it is past that default speed.