You said the fan is broken, but from your description I believe you have a defective switch which will need to be replaced. How you go about this depends on whether or not there is a light fixture attached to the ceiling fan. Make sure the power is still off at the breaker – not just the wall switch!! If a light is attached, you will have to remove it. Remove any globe and bulb/s. The fixture is usually attached to the fan by 3 or 4 small screws around the base. When this is pulled free, support the light fixture with a bent coat hangar so that it does not dangle by the electrical line. Locate the faulty pull chain switch and unsnap the chain. unscrew the knurled nut which holds the switch to the fan housing and pull it free. cut it free with wire cutters and take to supply center to ensure correct replacement. Good luck.