What is the difference in the hard drive and the memory of a computer?

I'm planning on buying the new iMac as my first computer in a couple months. I've never understood how the two are different. Like on an iPhone it just has memory and no hard drive. Also as part of my initial question in your explanation, if I download adobe photoshop then does it go to the hard drive or the memory? What about my iTunes music downloads and pictures saved to the computer?

Hard Drive is how much files you can store. Example, if its 250gb then you can store 250gb worth of stuff like music, pictures, etc. When a iPhone is 8gb, you can only put 8gb's worth of music and pictures.

The memory can be confusing, but it has nothing to do with how much you can store. The memory, which you should just call RAM, is the space where running programs can run. In less complcated terms, the more of it, the more tasks your computer can withstand.

Generally, the RAM will be much much lower than the Hard Drive memory, so it's easy to see which ones which. Ram usually goes in 4gb, 8gb and 16gb.

You are confusing hard drives and solid state memory (flash memory). They both do exactly the same thing, but flash which is common on phones and iPods is more compact and efficient at the expense of higher costs.

Many laptop and desktop computers are going to flash memory because access is faster, so the hard drive's days are numbered unless you need a huge amount of storage.

Both hard drives and flash drives are non-volatile (keeps memory when the power goes off) and are different from RAM and Cache, which your computer uses to run programs.