One of the best features of the RaspberryPi is the GPIO (General Purpose Inputs & Outputs).
Reading the input levels on the GPIO is pretty easy, especially using Gordon's wiringPi library.
But you need to think carefully about how best to do this in the software for your chosen project.