Immanuel Kant defines analytic, synthetic, a prior, and a posteriori in his Critique of Pure Reason. Let's go through each one.
Analytic
This is a statement based solely on the definition.
Examples
A triangle has three sides. (Why? That's the definition of a triangle: three-sided polygon)
A bachelor is unmarried. (Why? That's the definition of a bachelor: someone who isn't married)
Synthetic
This is a statement that is related but requires some thinking.
Examples
All bachelors are alone. (Why? The definition of a bachelor is an unmarried person. An unmarried person is alone. Thus, a bachelor is alone.)
All vertebrates have hearts. (Why? The definition of a vertebrate is having a spine. All organisms with spines also have hearts, so all vertebrates have hearts.)
A priori
This means the statement doesn't depend on experience.
Examples
7 + 5 = 12 (Why? This is true without having to think back to a specific experience)
All bachelors are unmarried (Why? This is also true without having to think back to every bachelor. It's just a property of bachelors.)
A posteriori
This is a statement that does rely on experience.
Examples
Mathwizurd.com exists (Why? The only way to know this is by experience)
All bachelors are unhappy. (Why? You must think about the bachelors you have met. It's not the definition nor is it dependent on it.)