Below are the hardware components of a PC in terms of their affect on computer graphics. It is possible to use Photoshop, for instance, on a low-end laptop, but one can enjoy much better performance when using a more capable system.
The CPU traditionally performs all of the calculations that Photoshop requires to be evaluated. This includes, for instance, the transformation of an image using complex warp, rotation and skewing algorithms. Having a faster CPU will make the process of performing transformations, applying filters, processing video (an often unknown capability of Photoshop) and batch-editing photos much quicker. A multi-core CPU can also be utilised by Photoshop for some tasks, which makes the hyperthreaded nature of many Intel processors attractive.
Memory, also called RAM, hold data temporarily for the system during operation. Having more RAM in a system allows programs like Photoshop to load more data, such as photos, into RAM where they can be accessed much quicker. Mass storage devices such as SSDs and (in particular) HDDs can only be read from at a slower pace than RAM. This results in images loading slower and responding slower to adjustments. If less RAM is available to the application, it will be forced to only load a portion of the images requested, and will have to resort to loading them from the hard-drive if requested.