Simple, open up your case on your computer, make sure it is powered down.
Take out one stick of ram, and look and see if there is a tiny white label on it or sticker.
Sometimes it will say DDR DDR2667 or DDR3 with ram manufacturers name and model number on it.
Also it does matter of what ram you buy, compatibility, DDR2 may not work on DDR based motherboard platforms and etc, so becarefull of what you buy online.
There are a few ram sticks that might not have it, another way to check is to use cpu-z. CPUID - System & hardware benchmark, monitoring, reporting