Jo, like the word ja, means yes – but knowing which of the two to use is often tricky for Swedish learners. A reasonably simple rule to remember is that ja is used for affirmative answers to positive questions…
Talar du svenska? Ja (Do you speak Swedish? Yes)
… and jo is used when answering negated questions in the affirmative:
Talar du inte svenska? Jo (Don't you speak Swedish? Yes [I do])
Jo is also often used as a more insistent yes: “I don't want fika.” “Jooo, just a cinnamon bun!”
Or when arguing with someone: “Nej!” “Jo!” “Nej!” “Jo!“
In other words, it is used to mark that the answer to a negative question is not what might have been expected or to express an opinion which is different from what someone else just said, but it can also express reluctant agreement (“jo, men…” “yes, but…”) or be used at the a start of a sentence to make sure you have people's attention before you get to the point, the same way an English speaker might use “well”.
Jo may be a short interjection, but it is full of nuances that can be interpreted differently depending on tone of voice, inflection or use of extra words: the more insistent joho, jojomen, jodå, jo visst, or the slightly less certain jovars. And an impressed “jo jo” can be used to mean “well, well”.
To confuse matters further, in northern Sweden the word jo is used more frequently and in a wider range of contexts, and is often interchangeable with ja. It is often also inhaled, causing that strange yes that sounds more like a gasp. Here's a video by The Local investigating this linguistic quirk:
Kommer du inte? Jo, jag ska bara göra en grej först
Are you not coming? Yes, I'm just going to do a thing first
Svenska är inte ett svårt språk. Jo, det är det!
Swedish is not a difficult language. Yes, it is!
Jo, det är så att min mamma kommer på besök i morgon
Well, you see, my mum is coming to visit tomorrow
I have nothing to say so I'm using this filler word to make the silence less uncomfortable (Literally: yes-then-so-that)