Whether using a digital sensor, or film, the principle is the same. The surface is sensitive to light, that sensitivity is listed as the ISO or ASA of the surface. ISO 100 for instance is not very sensitive so you need a fairly well lit scene to get decent shots. ISO 3200 is very sensitive, suitable perhaps for handheld indoor shots.
In general the greater the sensitivity the less clear the image. This varies from brand to brand (of film and digital cameras) but in general you want to use the lowest ISO possible for best image quality.
For me, the choice is dictated by, or at least heavily influenced by, the end goal of the image. If its just a facebook pic or something information, its not really a factor, set it high and snap away. But, if it is going to be in any way a professional image with printing or other commercially deliverable goal in mind, I will stay under ISO 400. If it is very bright, or I can use flash, ISO 100 or ISO 200 is best.
I will get into more under the shutter speed article, but there is a tipping point of get the shot or not, if you cannot get any more light to the sensor, and you still don’t have enough with even very slow speeds, there comes a point your hand held shot will simply be unclear due to hand shake, or, because the subject is moving. In these situations you only have ISO to fall back on so turn it up to a higher number. For me, shutter speeds around 1/30th or 1/50th of a second are about as slow as my hands will permit. So that’s when I have to decide. Your mileage may vary. Tripod helps but if your subject is moving you are back to needing a faster shutter again, leaving ISO your only remaining variable.