The answer to 'how to fix electrical wiring' is to first turn off the power to the affected circuit at the main circuit breaker or fuse box. Then, carefully inspect the wiring to identify any damaged or loose connections. If you find any issues, you'll need to repair or replace the wiring as necessary. This may involve stripping the insulation, connecting the wires securely, and securing the connections with wire nuts or electrical tape.
It's important to take proper safety precautions when working with electrical wiring, such as wearing rubber-soled shoes, using insulated tools, and avoiding damp or wet conditions. If you're not comfortable working with electricity or the issues are more complex, it's best to call a licensed electrician to handle the repairs.