Every pixel has a position on screen, and UV coordinates normalize that position to a 0–1 range so your shader looks the same at any resolution. You compute them by dividing gl_FragCoord.xy (the pixel's raw position) by iResolution.xy (the screen size). Once you have UVs, you can use them as colors to produce the classic red-green gradient — a visual proof that your coordinate system is working correctly.
Key Concepts
gl_FragCoord
iResolution
normalized UV
coordinate systems
Try this shader live in the Shader Sandbox editor with real-time preview.