In canning, pectin is released from the cut fruits during cooking (or additional powdered pectin is added) and a few things have to happen in order to make it gel again. Simmering the fruit evaporates some of the moisture and concentrates the pectin. And then, the adding sugar and an acid like lemon juice encourage the pectin to reform as a jelly.
If your jam ends up loose and liquidy, either you didn’t cook it long enough, didn’t use enough sugar, didn’t use enough acid, or there just wasn’t enough pectin in the fruit to gel it after cooking. If your jam ends up very hard, one of the reverse scenarios probably happened.
The Joy of Cooking has a lot to say about pectin and canning. Its authors are adamantly against the use of commercial pectin because they feel its use require the addition of too much sugar, to the point where you lose the essence of the original fruit. Instead, they recommend supplementing low-pectin fruits (like pears, cherries, and raspberries) with some high-pectin fruits (like apples and plums).
What experiences have you had with pectin while canning?