Never took plan B pill, should i?

Sooo when does one know whether or not to take the plan B pill? Is it when you happen to have unprotected sex or ..? I've heard that it can mess up your body, how so? My period ended yesterday & i had unprotected sex this morning. My bf pulled out but then put it back in right away & he said he cummed a 2nd time but it wasn't much. Someone help me please because I don't want to take the pill f9r nothing but i also don't want to get pregnant!