Object Oriented Programming (OOP) allows your to pair the data and methods that work on that data together. It also allows for things like inheritance. Typically it is used when you are writing larger more complex programs that have a lot of moving parts.
I am currently using the JMP classes to create a standard library for engineers at my company that will simplify the programming and make it easier for any progamming level to quickly start programming. For example instead of having to create a SQL query, perform an analysis, and generate a report from scratch those things can all be made methods of the class making it much easier to generate.
Example Below:
obj = NewObject('BetaRayClass', lot = 'lot number');
dt = obj << Get Data();
dist = obj << Get Distribution(capability = "True");
sum_stats = obj << Get Sum Stats();
cpk = obj << Cpk();
graph = obj << Get Hist();
All of the "Get <Something>" functions are methods of the class. Classes make this very easy to do as the methods (or functions) of the class have access to the declared properties (or variables) inside the class.
Below link is a good explination on OOP programming but in Python. Main concepts will still apply just syntax will be different.
https://python.swaroopch.com/oop.html