replacing a light switch
Does the light this switch controls have a second switch? Meaning, is it a three way switch? If so, you should have one white, one black, and one red (this one may be white if it was done by someone who did not use appropriate wiring). This would mean that you will have to find some means of making a plan of what wires run where, and then make the necessary connections. If you are not electrical-savvy or are not comfortable working with electricity, call an electrician.

If, on the other hand, this is the only switch for the light, then it is not normal to have two white wires and one black. You should have either two whites and two blacks, or just one white and one black. In case you take a closer look at the wiring in the wall and find four wires, plug one white on each end of the single pole switch, and wire and cap the two black wires together. Make sure your ground is connected.

This leaves you with one last option - your switch controls more than just one light (i.e. light + fan). In that case, you have wiring that does not conform to code ; as far as I know, and please correct me if I am wrong, you can only have one wire on every terminal of a switch. In this case, I suggest once again you call an electrician.