“Variables are used to store information to be referenced and manipulated in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold information” — LaunchSchool.com
There are infinity cases you can use variables in software developmet. One of them is for health-bars to define player’s current health.
Declaring variables in c#
This is how you can declare an int variable for player’s health.
Variables can store States!
Variables can store any kind of information, imagine you have different states for your game and you want to store that.