Man of Honour
'Technically they don't and it's guess work' was the response I got when I asked that particular question at the Natural History Museum when I was 10 .
That's a highly simplified answer for a child. Which is fine, since you were a child at the time.
It's not a guess. It's an assessment of probabilities based on extrapolation from known information.
People know some information about how skeletons of living animals can and can't fit together, some information about how the size and shape of bones relates to the forces imposed on them by the weight and movement of the animal, some information about how the size and shape of parts of bones relates to the muscles attached to them, etc. Combining the known information with fossilised bones from an animal makes it possible to extrapolate to the most probable structure of the animal. In some cases, it's pretty much certain. In others, less so (e.g. some areas of soft tissue or some details about animals for which only a few seperated bones have been found).