Both are true. The motherboard hardware determines how much memory you can install and still boot the system. Some editions of Windows limit how much memory it will actually use. Thus with Windows 7 x64 home premium, you can install 64 GB of ram (for example) if the motherboard supports it, but Windows (and programs running in Windows) will only use 16GB of it.
See here for the amount of memory supported by different editions of Windows:http://en.wikipedia.org/wiki/Windows_7_editions#Comparison_chart