Rib
Ribs are classed as flat bones which usually have a protective role in the body. Humans have 24 ribs, in 12 pairs. All are attached at the back to the thoracic vertebrae, and are numbered from 1–12 according to the vertebrae they attach to. The first rib is attached to thoracic vertebra 1 (T1). At the front of the body most of the ribs are joined by costal cartilages to the sternum. The ribs connect to the vertebrae with two joints, the costovertebral joints.
Loin
The loins (or: lumbus) are the sides between the lower ribs and pelvis, and the lower part of the back. It is often used when describing the anatomy of humans and quadrupeds (such as horses, pigs or cattle). The anatomical reference also carries over into the description of cuts of meat from some such animals, e.g. tenderloin or sirloin steak. 
In human anatomy the term "loin" or "loins" refers to the side of the human body below the rib cage to just above the pelvis. It is frequently used to reference the general area below the ribs. While the term "loin" is generally not used in medical science, some names of disorders do contain it.