The lightmeter in a mechanical camera is selenium or CdS cell type. Either way, it senses the level of incoming light and moves a needle (visible through the viewfinder in some cameras, hidden in others) up and down. When you press the shutter, the needle is securely clamped in position and the aperture, determined by the position of the needle, is read mechanically in the camera. More advanced cameras with aperture-priority or program modes have different mechanical linkages to set the exposure values.
When you change the ISO setting, a mask moves in front of the sensor to limit the incoming light. The 'mask' is a metal sheet, usually connected to the ISO ring, with a series of holes of increasing size. At the slowest ISO (say, 25 on a lot of cameras), a small hole is used to limit the incoming light, making the subject look darker to the camera. The camera will have to increase exposure accordingly. As the ISO is increased (say, to 400, the maximum on many cameras), the widest hole is used making the same subject appear brighter to the camera, therefore less exposure is given to the film.
Which camera were you using? If it's something like an Olympus Trip or a Canonet, which both have quite a fast slowest shutter speed, you might be just on the limit of the highest exposure the camera will give. Manually setting the widest aperture will stop the camera locking while giving approximately correct exposure.