how does the pill work?

I am getting birth control pills and i don't know how it works, do I take it every day at the same time orrr? Please help. And I am almost 18