HI,
This support documnet should help you to fix the issue.
This document pertains to HP Desktop PCs with Windows 8.
Step 1: Adjust the power settings
Step 2: Find the noisy fan
Step 3: Determine which type of fan is making the noise
Step 4: Troubleshoot the noisy fan
If there is any issue with the fan please contact HP support for fan replacement or repair.