Bones are a part of the body's skeletal system. A purpose of the skeletal system is to give structure and support to the body. I like to tell my students that without the skeletal system their bodies would be piles of "goo" on the ground. Your bones give your body a rigid platform to work against gravity. Any other organ and tissue type is soft and would sag down without bones to hold them up and support them.
Bones also give your muscles something to pull against. That's what muscles do; they contract and shorten. If muscles were not attached to something, the contraction would simply shorten the muscle into a ball shape. But because muscles are attached to bones via tendons, when a muscle contracts, it pulls the bone with it. That bone is more often than not, attached to another bone at a joint. The joint allows some kind of movement (pivot, rotation, slide). With the bone, joint, and muscle all working together, the bone's movement direction and intensity is determined.
Another purpose of the skeletal system is protection. The ribs and rib cage are a good example of this. It houses many of the body's vital organs within a protected shell of sorts. If those bones were not there, then your heart's protection would be limited to skin, muscle, and fat tissue.
A fourth purpose of bones is the production of blood. Bones contain an inner spongy tissue called marrow. Bone marrow produces blood cells.