I've seen both words being used (peanut butter and jelly; peanut butter and jam), but I was wondering whether they were both words for the same thing, or if there's actually a distinct difference between the two.
Wikipedia explains that the difference between jam and jelly is that jam uses whole pieces of fruit, while jelly uses the juice:
Properly, the term jam refers to a product made with whole fruit, cut into pieces or crushed...
Jelly is a clear or translucent fruit spread made from sweetened fruit (or vegetable) juice and set using naturally occurring pectin.
There is a difference. Jam in the UK, is what Americans call jelly. Jelly in the UK, is what Americans call "Jell-O".
The main difference, is how to use these words. Consider who you are talking to, to ensure that you make your meaning clear.
If you are talking to a British person and mention jelly, they will think of what Americans call "Jell-O". If you ask for jelly in the UK, you will end up with "Jell-O".
If you mean what Americans call jelly, you will need to use the word jam.
Otherwise, this can lead to a misunderstanding.