If you are having sex and something goes wrong with the condom, it's important to STOP having sex as soon as you notice.
Your next step is to get the morning after pill/emergency contraception. This is fairly easy to get in the UK, but it depends where you live. This usually is two seperate small pills, and you take them both at the same time. If it most effective if taken within 24 hours of sex, but can be taken up to 3 days after sex.
You might also want to talk to your gyno about other forms of birth control to help prevent situations like this in the future.