Compact bone primarily makes up the shafts of long bones, such as the femur and humerus, and forms the outer layer of other bones in the body. It is essential for protecting internal organs, such as the brain, heart, and lungs, by forming a sturdy outer shell.