Stats are a collection of point values distributed in different categories. These stats help determine how a Pokemon is best suited to perform in a battle. For example, the "Attack" stat helps to determine how much damage their "physical attacks" will inflict to another rival's active Pokemon. Higher attack stats means they will deal more damage to the enemy's health, which helps it finish the battle quicker and preserve it's own health from facing more of an enemy attacks.
Many stats have a counterpart stat to them. The counterpart to Attack is the "Defense" stat. Defense determines a Pokemon's hardness: or how their body's "physical defenses" can withstand a physical attack from a rival Pokemon. Higher Defensive stats allow them to prevent more damage from being inflicted on them.
So a Attack stat is weighted versus Defense stat, and the result is how little or how much damage is dealt. And that's the basics to how stats work.
Some stats do not have counterparts, such as the Speed stat which determines how soon they can act with their movesets. Faster speed can change the pace of a battle if the move can "hit" an opponent first or give them negative status effects to hinder their abilities, or perhaps "help" by provide healing and positive buffs to your own Pokemon.