How many hours?

Within how many hours do I have to take my birth control pill for it to be effective and keep me protected? Isn't it like 2?