According to Kant, analytic judgements are made up of subject and a predicate. The predicate expresses nothing which isn't already contained in the subject.
Take this analytic judgement:
“All bodies are extended.”
Here the subject is “all bodies” and the predicate is “(are) extended”. Within the subject is contained the concept [extended]. According to Kant, “I have not amplified the concept of body, but only analysed it."
Now take the following:
“All bodies have weight.”
Here the subject is again “all bodies” and this time the predicate is “have weight”. This judgement is synthetic because the predicate “have weight” isn't contained in the subject “all bodies”. This predicate, therefore, “amplifies” rather than “analyses” the subject.
We now have two terms which sum up what's just been written:
“explicative judgement” – adds nothing to the subject = analytic
“ampliative judgement” – increases the given cognition = synthetic
In what way do we know the analytic judgement to be true or false? We know it a priori. Take this judgement:
“Gold is a yellow metal.”
The concepts involved in the judgement above are empirical in nature. However, the statement above, according to Kant, can still be known to be true a priori. The reason for this is that, again, the predicate “yellow metal” adds nothing to the subject “gold”. According to Kant, we “require no experience beyond our concept of gold”. Yellowness (as it were) is contained in the concept [gold]. That means that the statement can be known to be true a priori.
According to Kant, arithmetical judgements are all synthetic and not analytic, as was commonly thought in his time (e.g. by Hume). However
7+ 5 = 12
is still knowable a priori; though it's nevertheless synthetic. Arithmetical statements are a priori “because they carry with them necessity, which cannot be obtained from experience”.
Why isn’t the above a mere analytic judgement such as “a = a”? Why is it synthetic and a priori? After all
7 + 5 = 12
12 = 12
which is a tautology of the kind
A = A.
7 + 5 = 13
would be a contradiction of the kind
12 = 13
A = B
Why does Kant think that 7 + 5 = 12 is a priori as well as synthetic? This is how Kant himself puts it:
“The concept of twelve is by no means thought by merely thinking of the combination of seven and five…”
“…analyse this possible sum as we may, we shall not discover twelve in the concept.”
We can't find the concept  within the concept [7 + 5]. What more do we need? According to Kant:
“We must go beyond these concepts by calling to our aid some intuition corresponding to one of them, i.e., either our five fingers or five points…”
This is very difficult to grasp without an explication of the notion of intuition. However, it's the intuition itself that's synthetic. Therefore the “five fingers or five points” needed for the intuition are derived from experience. Therefore they're synthetic (or the experience is). The judgement is synthetic a priori. To use Kant’s terms, the concept  is an “amplification” of the concept [7 + 5].
What about geometry?
Take the following principle of geometry:
“A straight line is the shortest path between two points.”
According to Kant, that statement is a synthetic judgement. Though it's also knowable a priori. It's relatively easy to see why the above is knowable a priori, but why is it also synthetic? Kant says:
“The concept of the shortest is therefore altogether additional and cannot be obtained by any analysis of the concept of the straight line.”
The concept [shortest] isn't contained in the concept a [straight line]. Or, more accurately, the concept [the shortest path between two points] isn't contained in the concept [a straight line]. Here again, according to Kant, “intuition must come to aid us”. Presumably here the (empirical) intuition is this:
That is, a straight line between two points.
Kant then summarises all the above. He calls synthetic a priori judgements “apodeictic”; just as we would call an analytic judgement “apodeictic”. Such judgements are apodeictic because the predicate is already contained in the subject. However, unlike a pure analytic judgement, such as
“All bodies are bodies.”
we need a “necessarily present intuition” which supplies the synthetic part of the judgement or statement. Unlike the above analytic statement,
“the predicate  belongs to this concept [7 + 5] necessarily indeed, yet not directly but indirectly by means of a necessarily present intuition”.
Kant went beyond the mere empirical synthesis of perceptions. He thought that there is a priori synthesis too. When perceptions are synthesized a priori, they are given, according to Kant, “universal validity”.