How do people get plague?

Bites or sick people. The plague is usually bubonic (one catches it from being bit by infected fleas or rodents, and the bacteria infects one's lymph nodes) or pneumonic (one catches it by breathing infected moisture droplets exhaled, sneezed, or coughed out by an infected person or animal, and the bacteria infects one's lungs). Without treatment, pneumonic plague is fatal.
Not common. You can get plague from a flea bite, that has been infected after biting a rat. It's not except in some areas with very poor sanitation.