Semaphores

Hi,
Can somebody please explain me what semaphores are? there purpose? and there effects?

Thanks in advance:)