what does the quote mean we cannot change the cards wse are dealt, just how we play the hand in the last lecture
Pausch is using metaphorical language in this quote to show the similarity between playing cards and dealing (no pun intended) with life. In other words, life and a card game (for example, poker) are sometimes governed by chance, and often you have to make the best of what life, or the draw of cards, gives you.
The point Pausch is making is that sometimes we have absolutely no control over what happens to us in life--in his case, he's referring to the fact that he developed a fatal disease and did nothing to acquire the disease. And he's comparing the lack of control we have over life to the lack of control a card player has over the cards he or she is dealt--in some respects, what happens in life and what happens during the dealing of cards is just chance. There is nothing you can do to change or influence the situation.
What you do with the cards, or how you react to a negative life event, however, makes all the difference in the world. Even though you can't control what happens to you, you can control the manner in which you deal with that event. In Pausch's case, he could have given up, felt sorry for himself, and just died. But because he was a teacher, he used his last months to try to teach people how to face their mortality with courage. He showed thousands of people how to use, in a positive way, a set of very bad cards they might be dealt in the card game of life.