They put you in a twilight sleep. Not quite completely out, but you don't really mind what they are doing. You can follow directions like cough on command. They put liquid in your lung and then suck it out and analyze the junk that comes out. I felt like I had been hit by a bus for about a week after. The doctor told me later that is because it is almost like giving you pneumonia on purpose.
The only good thing to come from it was they ruled out a bunch of potential problems.