The second formulation (CI-2) is the following:
So act that you use humanity, in your own person as well as in the person of any other, always at the same time as an end, never merely as a means.
Kant thinks that CI-1 and CI-2 are two sides of the same coin, though precisely how they are related is a matter of scholarly debate. Put very simply CI-2 says you should not use people, because if you do, you are failing to treat them as a rational agent and this is morally wrong.
For example, if I use your essay without your knowledge then I have not treated you as a rational agent. I would have done had I asked you for your essay and you had freely chosen to let me have it. But given that I did not ask you, I was in a sense making choices on your behalf and thus did not treat you as a rational agent. So according to Kant I should always treat you as an end not a means. I should always treat you as a free rational agent.
Kant’s theory then has a way of respecting the dignity of people. We should treat people with respect and with dignity purely on the basis that they are rational agents, and not because of their race, gender, education, upbringing etc. From this you can also see that Kant’s theory allows us to speak about “rights”. If someone has a right then they have this right irrespective of gender, education, upbringing etc. For example, Jill has a right to free speech because she is a person, consequently that right will not disappear if she changes her location, personal circumstances, relationship status, political viewpoint etc. After all she does not stop being a person.
Importantly, CI-2 does not say that you either treat someone as a means or an end. I could treat someone as an end by treating them as a means. Suppose that you have freely decided to become a taxi driver. If I use you as a means by asking you to take me to the airport I am also treating you as an end. But Kant does not believe this to be morally wrong because I am respecting you as a rational agent; after all, you chose to be a taxi driver. Of course, if I get into your car and point a gun at your head and ask to be taken to the airport then I am not treating you as an end but rather solely as a means, which is wrong.