Most touchscreens use capacitive sensing, which uses two glass layers, coated on their inside surfaces with strips of a transparent conducting material called Indium Tin Oxide.
On one layer the stripes run horizontally and on the other layer they run vertically. Each intersection acts as a tiny capacitor that stores an electric charge. When your finger touches the glass, it distorts the electric field and changes the amount of charge the capacitors underneath it can hold.
But this only works because your finger conducts electricity, but gloves don’t. Special touchscreen gloves work by using electrically conductive thread woven into the fingertips.