If i remember correctly, the algorithm is to draw a horizontal line through your test point. Count how many lines of of the polygon you intersect to reach your point.
If the answer is odd, you're inside. If the answer is even, you're outside.
Edit: Yeah, what he said (Wikipedia):
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…