I've done exactly this.
First, you'll need to exit out of Firefox completely before you continue. The steps are for Windows 7, but I believe it should be the same for all systems, including XP, Windows 2000, and Server 2003.
Then, what you will want to do is open Firefox (either 3.6 or 4, doesn't matter) through the command line to create a new profile. Use the -ProfileManager flag when opening.
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -ProfileManager
(Or whatever your path is)
By default, you should have just one profile, named "default." Go through the wizard steps to create a new profile for your Firefox 4 installation. It should be fairly easy and shouldn't take long. I named mine "beta."

Then, you will want to go to your main shortcuts for Firefox 3 and Firefox 4. I assume you're not running it straight from the program's directory.
There is one limitation -- only one of your installations will be able to support multiple windows of itself. You will have to choose which one you prefer multiple instances of before you do the next step.
Right-click your Firefox 3.6 shortcut and go into Properties. In the Target text box, after the file path, add -P default so it will look like:
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P default
The -P {profile name} flag denotes which user profile that shortcut will run under.
Likewise, you would do the same for Firefox 4:
"C:\Program Files (x86)\Mozilla Firefox 4.0 Beta\firefox.exe" -P beta -no-remote
The -no-remote flag is what makes this set-up work.
no-remote is a flag used by Firefox to separate an individual instance of the program from anything currently running. Without it set, any version of firefox.exe you run will just open a new window of whatever version you have open. Unfortunately, this has the problem of locking that profile, which means you can only have one window open using that shortcut.
(If you have it set on both of them, then you can have one window of 3.6 and one window of 4 only. I didn't realize this for a few days and didn't understand why I could only open one window!)
If you plan on using Firefox 4 more than 3.6, then add the flag to the 3.6 shortcut, but if you're like me then you're just toying with 4 and 3.6 is your main browser.