There's nothing worse than having your gaming session interrupted by the sound of whirring fans ramping up and down as your system tries to deal with the thermal load of its components. Even with the most efficient parts, you can still build a system that sounds like a rocket ship under load, and that can be frustrating. There's usually one or two reasons this might be happening, and luckily for you, they're fairly easy to nail down.

Related
5 myths about fans that are hurting your gaming PC's performance
Myths about PC fans might be keeping you from enjoying better temps, performance, and noise levels.
5 Poor ventilation
Suffocating your parts leads to more noise

One of the most common situations that leads to more fan noise is just poor ventilation. Whether that's due to your case design or the position that your system itself is in physically, limiting your system's access to air is a surefire way to make the fans work harder, which equals more noise.
A good way to mitigate this is by moving your system in some way so that the fans have better access to air. If your case has poor porosity for fan intakes and exhaust, it could just be the fault of the case design itself. Not all cases are created equal—even expensive cases can have poorly thought-out airflow paths, so choose wisely.
4 Dust buildup
Probably not the main issue, but it contributes

Dust buildup is another factor that can produce unsavory fan noise under load, especially if you have pets or live in a particularly dusty environment. For me, living in a condo, dust buildup is pretty common, so I have to clean the fan filters of my PC case monthly to ensure the airflow isn't impeded.
Dust buildup alone isn't usually the cause of fan noise in desktop PCs, but it certainly can be if it gets bad enough. Give your filters a good clean if your case has them, and make sure any heatsinks in your system are also free of any debris, especially for your GPU.

Related
4 ways to prevent dust from slowing down your PC
Don't let dust and other particles beat you and your mighty system.
3 Overheating components
High heat means high fan speeds
If poor ventilation and dust buildup weren't to blame, it's important to check the temperatures of your main components: the CPU and GPU. These are the primary sources of heat output in your system, and the temperatures of each are usually the primary point of reference for fan hysteresis.
For both the CPU and GPU, anything over 80 degrees Celcius will usually result in fans ramping up to a high decibel level, especially if the fan curves are set to default. Anything over 90 degrees Celcius starts to enter the neighborhood of overheating, in which case your fans should be working at 100% to try and dissipate the heat. If your CPU is overheating, check to ensure that thermal paste is properly applied and your cooler is mounted correctly. For the GPU, it's usually down to its access to fresh airflow, but you can re-paste it as well if you suspect it's an issue.
2 Fan curves are too aggressive
Tuning your fans down reduces noise, if you can afford the thermal cost

If your temperatures look good, the noise you're hearing is likely due to your fan curves being set too aggressively. Default fan curves are set in this fashion to be a sort of "one size fits all" approach, keeping your components at a comfortable temperature at the cost of noise.
The good news is: you can tune these yourself, both for your CPU and GPU. In the case of your CPU cooler and case fans, modern motherboards allow for fan curves to be modified in the BIOS. A less aggressive curve will allow for your system to be a bit quieter at lower temperatures, and usually there will be a "Silent" preset available. Your fans will still ramp up under load, but the frequency at which they do so will be more limited.
For your GPU, there are many applications where you can edit fan hysteresis. MSI Afterburner is my tool of choice for this, because it also allows for easy monitoring of temperatures for all my components.
1 Old fans
Out with the old...

If you bought your system awhile ago, or it's a bit old, your fans just might be reaching the end of their lifespan. Computer fans will usually far outlast the usable lifespan of your components, but many users will opt to reuse old cases and fans for new components. There's nothing wrong with that approach, but old fans will just be louder, especially if the bearings within are starting to go.
The best thing you can do in this scenario is just buy new fans. Repairing existing fans isn't realistic with the way they're constructed, so you'd be much better off just getting a new set. This also goes for the fan(s) on your CPU cooler if you've been using the same one for a long time.
Your experience doesn't have to be loud
A loud PC is one of the easier symptoms to diagnose and rectify, but it isn't always straightforward. It comes down to keeping your components at a reasonable temperature, having well-designed and maintained components, and ensuring they're set up for reducing overall operating volume.