General questions about accepting a job offer

I got two interviews recently and I like the second company better. But, because of the timeframe of the interviews, I think the first company will tell me the result faster. I was wondering if I should accept a job offer immediately if the first one wants to hire me. There is no guarantee if I'll get an offer from the second one. If I honestly tell them the situation, they would no longer want to hire me? I don't know actual hiring process, if they usually give candidates some time to decide. They are both small companies. Please let me know how I should handle this situation.