Static when guitar is plugged into interface for recording

guitars are noisy, that is just how it is. if you hear the noise levels change when you are plugged in a walk around your room a bit and turn your self you will hear how pickups pickup electromagnetic radiation around you (from house wiring for example).
Most people use a DI box to get the best signal balancing into a DAW.