Why do cats suddenly run as if chasing something?

OK..I have a cat and don't know too much about cat behavior. I'm learning as we go along. Sometimes she's just sitting just so still, looking out the back window or something. . .and then she takes off like a wild one and zooms up the stairs to one of the bedrooms. It would seem like she is chasing something, but there is nothing there. . .at least nothing we can see!
Or she'll be lying on a chair in one of the upstairs bedrooms and suddenly go running all the way to the basement.
Why do cats do this?????