Muscles attach to bones via tendons, which allows them to pull on the bones and produce movement.