As maurits6814 has asked, this answer may not apply if you're transferring data from a hard drive used with a PC.
But...if you're transferring your data from a Time Machine backup from an older Mac, the best means of doing this is via Setup Assistant, which runs once (and only once) when the new iMac is first powered on.
The next best means is via Migration Assistant. Migration Assistant can be run at any time, and can be found in Applications --> Utilities. I would urge you to read the excellent information provided by "The Great Pondini" at the URL linked below, as it will probably answer just about any question you might have regarding transferring everything over:
http://pondini.org/OSX/Home.html
I hope this helps!