morning after pill

My boyfriend and I had sex and the condom broke. I need the morning after pill but idk when to take it and when it would be most affective