Humans have been wearing armor for thousands of years. Ancient tribes fastened animal hide and plant material around their bodies when they went out on the hunt, and the warriors of ancient Rome and medieval Europe covered their torsos in metal plates before going into battle. By the 1400s, armor in the Western world had become highly sophisticated. With the right armor, you were nearly invincible.
All that changed with the development of cannons and guns in the 1500s. These weapons hurl projectiles at a high rate of speed, giving them enough energy to penetrate thin layers of metal. You can increase the thickness of traditional armor materials, but they soon become too cumbersome and heavy for a person to wear. It wasn't until the 1960s that engineers developed a reliable bullet-resistant armor that a person could wear comfortably. Unlike traditional armor, this soft body armor is not made out of pieces of metal; it is formed from advanced woven fibers that can be sewn into vests and other soft clothing.
Hard body armor, made out of thick ceramic or metal plates, functions basically the same way as the iron suits worn by medieval knights: It is hard enough that a bullet or other weapon is deflected. That is, the armor material pushes out on the bullet with the same force (or nearly the same force) with which the bullet pushes in, so the armor is not penetrated.
Typically, hard body armor offers more protection than soft body armor, but it is much more cumbersome. Police officers and military personnel may wear this sort of protection when there is high risk of attack, but for everyday use they generally wear soft body armor, flexible protection that you wear like an ordinary shirt or jacket.