Kripke begins with the assumption that Leibniz's Law is correct: identity is ``an internal relationship,'' meaning that identity is a relationship between objects, not names. (Remember Frege's initial question about the relationship of identity.)
As he develops his theory of names, Kripke invokes the notion of ``rigid designation'' to explain how this is expressed in language.
How is this possible? In the first case, rigidity entails that ``a'' and ``b'' always pick out or designate the same object; therefore, there is no possible circumstance in which they designate a different object. Given that they designate the same object in this ``world'' or set of circumstances and that that object will always be the one designated, it follows that they will designate that object in all possible worlds, circumstances. This is simply to say that ``a = b'' will be true in all possible circumstances, which is what it means to say that ``a = b'' is necessarily true. By contrast, in the second case, since ``a'' and ``b'' are not rigid, their referents can vary given the circumstances of their use; but this means that even though ``a = b'' is true in this world, there is a world in which it is not true. This is what it means to say that ``a = b'' is contingent, not necessary.
In short, rigidity entails sameness of reference in all possible worlds, while non-rigidity entails that it is possible that, in some circumstances (some possible world), identity of reference fails.
1 is Leibniz's law; 2 follows from 1 with a definition of rigidity; 3 is the claim that Kripke argues for based on his argument that proper names are rigid designators.
What does Leibniz's Law tell us? It's clearly a statement about ontology, about the world and the things in it. From the claim that identity is an internal relationship, it follows not only that true statements of identity are necessarily true, but that denials of true identities are necessarily false. Compare this with the status of a statement about the reference of some term:
``the referent of `a' = the referent of `b'''
Even if the referents themselves are identical, there is nothing in language or the world that forces us to use the marks, sounds `a' and `b' to pick out (whether rigidly or not) just THIS object. If, therefore, we were to suppose that identity was a relationship between words or names, we could not account for our intuitions that once we have established which object(s) we're talking about, identity is not something that we can define into and out of existence. However, since we can define and redefine the use of marks and sounds, this cannot be the identity we are after.
Let's suppose that we can. From this it follows that there is such a thing as contingent identity. What would this mean? We can certainly imagine that we have two items, a and b, which happen to share all their properties, save, of course, spatio-temporal location; they are both pink, they are both 6'' cubes, they are both made of lucite, they both weigh 2 pounds, &c. We often say that these two cubes are ``identical.'' Now what if they are contingently identical? What might this mean?
Kripke suggests that it can only mean that while a and b now share all their properties, we can imagine that one of them is shaved down so that it is now 5 1/2'' x 5 1/2'' x 5 1/2''. In this case, they would no longer share all their properties, they would no longer be identical. Of course, this is possible, but all that it shows is that properties (and I'm here ignoring essentialism and any essential properties) are things that objects can put on and take off without affecting the identity of the object. a is, for example, still a even if it's no longer a 6'' cube. And even being a 6'' cube with all the other features was not enough to make it identical with b in the sense we were interested in in the first place.
But, the critic says, this notion that properties can coincide contingently presupposes that a and b were never really identical in the first place, therefore, they were never ``contingently identical.'' Kripke then asks us to explain what ``contingent identity'' means. If a and b are really just the same one single object, what do we mean in saying that they ``might have been different''? Different from what? We have seen that to say that something is identical with itself doesn't entail that it must forever keep all the features which it presently has, but this doesn't make it possible for something to keep and lose a feature at the same time. So what does it mean to say, for example, that Cicero is identical with Tully but he might not have been? It doesn't mean that this man might have been called `Cicero' but not `Tully.' That's obviously true, but has nothing to do with the identity of the man in question. It doesn't means that he might not have been a statesman, concentrating on rhetoric to the exclusion of everything else. Again, that's obviously true. But in neither of these circumstances does he cease to be either Cicero or Tully.
Now, Kripke asks us how are we to express all of this is language? We can, he argues, do so ONLY IF we have available to us some mechanism which allows us to get at the object itself without approaching it via its properties (most of these can, as we've seen be taken off, added on, &c) without affecting the object itself. This, in turn, means that at some point if we are to talk about the world, we need a linguistic device which functions to put us in direct contact with Reality and in such a way that we can talk about the fact that Reality is made up of objects which have such features as being necessarily identical. All of which is merely to say that we need rigid designators.
Whether we agree that NAMES are rigid designators or not is in an important sense quite beside the point: whatever functions as a rigid designator, Kripke is making two claims which stand independently of how proper names themselves function.