When is it over?

When is the first trimester over? At the 12 weeks or starting the 13 weeks? How does it work?