Birth control

How does the patch work? If I get it can I have unprotected sex that same day?