First and foremost, do not power on the system with the (accidentally) formatted drive installed. Each time you boot, files may be read and re-written to the drive, over-writing what at this point could be recoverable data.
Next step is to determine what happened. If you accidentally did a "Quick Format" on a disk much of your data is probably safe, as a "quick" format merely overwrites/erases the disk's File Allocation Table or "index" of where the files are actually written, but stops short of actually writing over the files themselves. If a "full" format was executed or if dedicated disk "wiping" software was run, you're in a whole lot more trouble and you're not likely to be able to recover the data yourself.
Let's hope you just did a "quick" format of the wrong drive...
I have had good luck with recovery software software from DiskInternals. I've also used SpinRite from Gibson Research with the added benefit of bringing a failing disk back to life. Neither is free, and there are probably reputable free utilities that can reliably recover your data, but these are the ones I've used, and whether there's any merit to it or not I feel like I trust a "paid for" app over a free one. Try DiskInternals.com (UnEraser or Partition Recovery) or GRC.com (SpinRite), and I'm confident you'll get your data back.