Hurts when I try to lift something or shake someone's hand is it sprained or broken what should I do?

Could be either. If you injured your hand, and it is swollen, bruised, and painful, it could be broken. If you did not do anything to it, but it hurts, it could be a strain, arthritis, or nerve issue. Seek the care of an orthopedic surgeon or musculoskeletal specialist.