One simple example is this:
dd if=/dev/sda of=/dev/sdb
But if you have some special needs, you really should read the manpage (man dd) or search on Google.
Another idea could be the use of rsync (don't forget to set the right options, like -az [packages the files instead of copy one file after another] or --numeric-ids [uses the uid/gid instead of names like "root"] and maybe some others). The link contains many examples.
If the new HDD doesn't have partitions, you can use gparted or palimpset.
When you're unsure I would format the HDD and then sync the data with rsync.