There are 3 main computer components that samples can benefit from, these are:
RAM: How many samples you can have loaded to play at once.
CPU: How much audio your machine can process simultaneously, as well as any effects and plugins.
HDD: The speed of which your samples are loaded into RAM, and how quickly they can be streamed for realtime playback.
CPU (Processor)
Your processor is the 'power' behind everything your computer is doing.
The more plugins and effects you use, the more your CPU will be working. The more 'voices' you are streaming from samples, and the more scripting/programming that is being executed by software and libraries, the more your CPU will be working. For example, a complex 'legato' patch will almost always use more CPU than a standard sustain patch.
A modern quad-core Intel i5 or higher is generally sufficient for entry-level audio work.
RAM
The more RAM you have, the more instruments you can have loaded in a project.
Simple patches such as a percussion instrument (eg. Snare Drum) will usually include multiple velocity layers and 'Round Robin' samples. All of these will be loaded into RAM. If you want to host large orchestral templates or other projects where you have many tracks 'ready and available', even if you don't know if you'll need those specific tracks, then 32GB or higher is a good idea. You can get by with 16GB if you just load your tracks one-by-one as you need them.
Because of the above points, generally 16GB of RAM is recommended, with 8GB as a minimum.
Hard Drive
When playing with sample libraries, only a tiny fragment of the samples are loaded into RAM. The and the rest of the sample is streamed from your drive. Hard drives can only stream so much information at once before reaching their 'bandwidth limit'. SSDs have a much higher bandwidth limit and can handle streaming much more audio at once. For these reasons, SSDs are highly recommended as sample drives.