Every hardware you install into your motherboard has a SPD chip inside of it which allows the motherboard to determine the specifications of that hardware. Everytime the system boots, it will look at the SPD chip(s) to determine the capabilities of the device. For RAM, this is what the SPD chip looks like.