By ends, Kant means that every human has a life, and duty, much like you. You should treat others as if they are a beautiful creation. When Kant states that humans are not means, he proposes that people should not use other humans as ways of getting something he or she wants.
Kant believes you should not use other human beings, as a way to accomplish something, a pawn in your game. Kant believes your duty creates the motives you should act on.
A Kantian example of good and bad motives starts with feeding a hungry homeless man. Using Kant’s explanation of bad motives, imagine you are walking with your friends and you see a homeless man. Thinking about how good you will look in front of your friends if you buy the man a lunch. You walk to the store and purchase a lunch and give it to the man. As you walk away, your friends are clapping and you feel validated. Kant would think that this is not a moral decision. Although you are doing your duty, you do not have the right motives. Now imagine that you are with your friends and you are walking down the street. You see the homeless man and take note of him in your head. After you leave your friends, you go