You can stop taking the pill whenever you want, but keep in mind that if you want to prevent pregnancies, you'll need to use another form of birth control.
If you're looking to come off Yasmin because you want to have a baby, it's recommended that you wait until you've had a full menstrual cycle so you can accurately track the pregnancy.
If you have reached the end of your Yasmin pack and you're switching to another birth control pill, you should take the first pill from your new pack on the same day that you would have taken the first pill in your next Yasmin pack.