Birth control

Okay so I recently had sex with a friend of mine unprotected and he came inside me! So I'm not on any birth control and my friend gave me her pills and told me to take 4 so I won't get pregnant.. Will this prevent me from getting pregnant as I couldn't get the emergency morning after pill as it was labour weekend and everywhere was closed!! HELP! 😩