There's a good guide on how to get Windows 8 working under VirtualBox available here:
VirtualBox installs as an application in your existing Windows 7 (or linux) operating system, and allows you install other operating systems (like Windows 8) such that they can run in a window as a guest of your current operating system. Modern computer hardware has special features to make this virtualization process more efficient, but there is still a performance penalty for doing this. Take that into account when evaluating a guest operating system.
It's worth noting here that this arrangement does not make you eligible for an upgrade edition of Windows 8. You must buy a full version of Windows 8, or have another version of Windows that is not in use (your "host" Windows 7 is still considered to be in use) and available to be installed (an OEM Windows 7 or XP license that came with another computer is not "available to be installed") to be eligible for a Windows 8 Upgrade edition and associated pricing.
Since you are reluctant to put this directly onto your main system, it sounds like it's intended for practice/learning or a trial. In that case, there is a free 90-day evaluation version that is available. I recommend starting with that. You can get it here: