I've made a class in which I want to keep track of stats of students. I intend to make a GUI later to manipulate this data.

My main question is: what is the best way to save and later retrieve this data?

I've read about pickle and JSON, but I don't really get how they work (especially about how they save the data, like in which format and where).