People sometimes express perplexity at Kant's claim that all three formulations of the categorical imperative say exactly the same thing. While I'm not really surprised at the perplexity, since the derivations are thoroughly crazy-making, like some weird labyrinthine hall of mirrors, the basic idea of what Kant is doing is pretty clear, and it does indeed have the result that all the formulations are formulations of one categorical imperative. Basically we recognize that the categorical imperative has to be consistent with willing the categorical imperative, and use that to reflect it on itself.
We start with the principle that the only unconditional good is good will; all other goods are conditional, and indeed only good insofar as they are means to good will as an end. Because good will is the only unconditional good, it must be universal as good for all rational beings. And because it is unconditionally good, having a good will must be consistent with at the same time willing to have a good will, universal for all rational beings, or, to put it in other words, the good will must be that will which has a maxim (which serves as its rule of working and its standard of success) that can consistently have as its object a rule of working and standard of success universal to all rational beings as an unconditional end of willing.
From which we can get the categorical imperative: Act according to that maxim whose universality as a law can at the same time be willed.
This is an adequate expression of the categorical imperative itself; but we can expand its terms in such a way as to highlight, for practical purposes, different features that are part of willing (acting according to maxims) in such a way.
For instance, the universality of law for a rational being can be seen as analogous to the universality of law for nature generally; in other words, the laws of nature are nature considered in its formal structure, and by focusing on universality itself, we can emphasize the formal structure of good will by analogy. Thus we want to say, act according to that maxim whose universality as a law [in the way the laws of nature are universal] can at the same time be willed. And from this we can get the first formulation: Act according to that maxim that can at the same time have for its object itself considered as a universal law of nature. This says the same thing, but it says it in such a way as to bring out the formal structure of good will as universal.
But we could instead choose to emphasize the material the good will is willing. The good will is a rational being willing in such a way that it can be unconditionally good; and the good will wills in such a way that it can also will every rational being to be an unconditional end. Now, since the good will is also acting according to maxims whose universality as a law can at the same time be willed, to will every rational being to be an unconditional end is to act according to that maxim which at the same time is universally valid for every rational being. From this we can get the second formulation: Act according to that maxim with respect to which every rational being can consistently count as an unconditional end, or end in itself. This says the same thing, but it says it in such a way as to bring out the material character of good will as having itself as an unconditional good or end in itself.
We could, however, instead choose not to emphasize one or the other but how they are both aspects of the same categorical imperative. This requires a bit more maneuvering, because we have to work from both directions. The good will is a rational being willing in such a way that its maxims can be universal law; we can bring this out by analogy with legislation, and say that the good will is a rational being consistently capable of willing rational being to be a universal legislator giving the law to all rational beings. I will repeat that, so you know that I'm not accidentally duplicating words: the good will is a rational being consistently capable of willing rational being to be a universal legislator giving the law to all rational beings. Thus good will is rational being willing in such a way that it can consistently also will itself as a rational being to be a legislator of universal law for all rational beings; but the good will is also rational being willing in such a way that it can consistently will as its end every rational being having such a good will. But this means that, just as we can think of nature as a kingdom of natures governed by the universal law of nature, we can think of rational beings as a kingdom of ends governed by the universal law each rational being is legislating for rational being. Such a kingdom of ends does not actually exist, but it doesn't need to; it just has to be that with which the maxims of good will are consistent. Thus we get the third formulation: Act according to that maxim which can be the maxim of a legislator of universal law in a merely possible kingdom of ends. This says the same thing, but it says it in such a way as to bring out the way in which the formal and the material mutually play into each other in actual willing.
I am simplifying all of this somewhat. The difficulty of the derivation, of course, is that we are in a sense engaging in a baroque process of folding things on themselves: the good will must be structured by something capable of being universal law for good will as unconditional good, which means that it must involve willing in such a way that rational being could consistently always count as unconditional good since good will is rational being willing good will as universal law, which means that it must be rational being willing such a way that that it can also consistently will itself to be rational being willing universal law for rational beings in a system of rational beings willing universal law for rational beings! You could expand the whole thing infinitely, and it wouldn't change a single thing. The primary value it has is exactly what Kant says it has -- it gives us a number of ways of talking about the categorical imperative, and the different ways of talking about it can be easier to apply for some practical situations by emphasizing different ways in which it relates to our experience of acting.
We can think of it in terms of a metaphor. The categorical imperative is in a sense back behind the line of sight of practical reason, since practical reason's 'line of sight' depends on it. So we use a mirror. We could use another mirror from a different angle. And we could even use both mirrors in such a way that they reflect each other reflecting the categorical imperative. Depending on your circumstances, any of these might be useful. If you're shaving, you just need a mirror. When the barber or stylist shows you the back of your head after you get a haircut, you get a mirror to reflect your reflection in the mirror. But the whole point of the mirrors is to reflect whatever you're looking at. And the formulations just reflect one and the same categorical imperative.