When you are looking at programming (and working your way to become a developer) there are some basics you have to learn. Types, Methods and Classes. Everything else sort of builds on this.
Types (sometimes referred to as variables) are like containers for the data that you wish to store, process, manipulate and anything else that you wish to do in your program (or project or solution or code file). To understand how types ( or variables) are like containers, let's take the example of a literal container.
Suppose, you and your friends are going on a trip. Water is one of the basic items that you will pack with you. So, you buy a container big enough to carry enough water that will be sufficient for everybody who is part of the trip. In this case, the 'water can' is a type that can hold 'water'. Here water is the data that you are storing in a 'water can'. As the trip progresses, you will consume the water in the water can. Similarly, as your program goes through its motions, you will consume the data from the type.
You may modify the contents of the water can (for example, you refill it when you take a stop at a hotel) during your trip. Similarly, you may decide to modify the data that is stored in this type as the program runs.
Now, I am going to add one more detail that will make things a little more complicated but eventually simplifying things. Everytime I am mentioning the water can, I am not talking about the actual water can that is carrying the water during your trip. Rather, I am talking about the plastic that has been designed in the shape of a can with the sole purpose of carrying water.
Similarly, when I talk of a type, I am talking about a 'data container' that has been designed with the sole purpose of storing a particular type of data. Which is also why, a type is not actually a variable. In fact, calling a type, a variable, would be wrong.
So, what do we call the variable? What do we call the water can that is actually carrying the water. If my understanding is correct, we call the actual variable, an instance of the type. Going to our trip example, an 'instance' of the water can design is what is actually holding the water.
Here is one more example.
You know soap? That you use to take bath or wash dishes (obviously you won't use the same soap to do both. That would be wrong) at your home. At the soap factory, there would be a metal template in the shape of the soap. Liquid soap will be poured into this template. Then, once it has cooled down, soap will be formed and packed. Later, the same template (probably hundreds of them) will be used to make the next batch of soaps.
Here, the template (usually made of metal in the shape of the soap that is being made) is the type. Using this type, a number of actual soaps or instances are created. Each instance is identical to each other, they may be used by different people at different times during their operation. They are identical because they are all based off the same template i.e. type. Each soap, and hence the instance, will share common properties like color, shape and density.
Similar to the above example, when you are building a program, you will be using a lot of 'instances' of different types. These instances are also referred to as objects or properties or variables. While each of these terms 'can' be used interchangeably, they are more suitable in a particular context. What I am trying to say is, these words – variable, instance, object, property – similar but not identical.
Check out this github link where I use a simple type (int) and a few instances of said type to do simple addition.
Follow me on twitter, facebook and instagram for more updates. Thanks!