Can I take pill without consulting in ob?

I am 18 and just had my first sex so I am afraid to get pregnant. My boyfriend uses condom. But I need a greater percent to not get pregnant. I want to take a pill but do I need to get check up first or can I buy immediately in the drug store?