Please post the full spec (or model number if a prebuilt).
No, "all RAM" does not fit into "all motherboards".
There's DDR, DDR2, DDR3, DDR4 - and various speeds within each of those. The motherboard vendor website should list what's compatible.
If it's a newer CPU/Mobo (Intel Skylake, 6th Gen or KabyLake 7th Gen.... or AMD Ryzen), it should be DDR4. Prior to that, should be DDR3.
If whatever it is you're contemplating buying is DDR or DDR2, reconsider that purchase. It's unlikely to be anything viable in 2017.