The after pill?

Hii there!

I was just wondering when do you have to take the after pill? Can you still take it 48 hours after unprotected sex? And do you have high chances of pregnancy if your period is due in 10 days? Thank you so much in advance!