A class represents section of memory, a blueprint. How the memory is layed out is dependent on how you designed your class. The idea is that you put related data and functions together. For example - a video game character might have hp and functions to take_damage or heal_hp.
It would be so tedious to create a new hp variable for every character and to manage them
OOP is the difference between
var badGuy = 100 // hp value
var badGuy_atk = 25 // attack power
var hero = 100
var hero_atk = 50
badGuy -= hero_atk;
hero -= badGuy_atk;
badGuy += 12 // heal after turn
and
var badGuy = Character(100, 25);
var hero = Character(100,50);
badGuy.take_damage(hero.attack);
hero.take_damage(badGuy.attack);
badGuy.heal
Note how the “formula” for characters is hidden behind their design. I don’t need to explicitly know the bad guy heals for 12 or how he attacks even. I just interface with something sensible (the functions that operate on the objects data)