It is removing fluid that builds up around the knee. It looks like a deep reddish color, thicker than water. basically the body sends fluid to an area where there is some type of 'stress', this cause the swelling to occur.
You can drain the excess fluid off your knee and sometimes it will come back sometimes it will not. I have had it done a few times on both knees. It may mean there is a greater underlying problem or it could come from blunt force to the knee or surrounding area. Twisting of the knee can also cause the swelling.
It does not really hurt to have your knee drained. Sometimes the doc will put a cortisone shot in why he is doing the draining. This will help with stability in the knee.
My 2 cents, i am sure i butchered it and a real doctor can do a better job explaining.