A loud fan could be caused by several different reasons. The type of sound you fan is making can determine the problem.
The most common noise is a humming sound, often caused by dimmer controls. Dimmer control weren’t intended to be used to control fan speeds, so the imperfect design can make a humming noise. A bad receiver could also be the cause for humming. If you have a remote control for your fan then the connection between that and the fan could cause the awful sound. Replace with proper fan speed controls or a new receiver immediately.
If it’s a rattling sound you’re hearing then it’s most likely due to loose screws. Loose screws that connect ceiling fan blades to the motor can cause serious damage to your home or even injury if not tightened.
When a fan is mounted directly onto the ceiling joist, (beams that provide support to your home), the above noises may be amplified. You’re directly mounted fan should include hangers to help to avoid the loud noise.
For any sort of loud noise your fan is making while it’s in motion, it’s important to contact a qualified electrician to find the source of the problem.