Do you have any previous shader experience?
Spotlights can be treated like pointlights, except they also have a direction and spotlight angle.
Then when calculating the light you get the direction from light to pixel (as always) and compare it with the spotlight direction.
For example a simple dot product will do. If the value is above a certain threshold (defined by your angle, or the cosine of the angle for dot products) you light the pixel.
here is an example snippet from such a shader
float DdotLD = saturate(dot(-DirectionToLight, normalize(SpotLightDirection[i])));
float coneAngle = SpotLightAngle[i];
if (DdotLD > coneAngle)
DdotLD = 1 - mad(DdotLD, 2, -coneAngle * 2); //-1.8f); //(DdotLD - 0.9) * 2;
DdotLD *= DdotLD;
float NdotLPoint = saturate(dot(DirectionToLight, normal));
diffusePoint += (1 - DdotLD) * NdotLPoint * SpotLightIntensity[i] * attenuation * SpotLightColor[i];
specularPoint += SpecularCookTorrance(NdotLPoint, normal, DirectionToLight, CameraDir, SpotLightIntensity[i], SpotLightColor[i], roughness, f0) * attenuation * (1 - DdotLD);