DataTypes : In Apex, all variables and expressions have a data type, such as sObject, primitive, or enum.
Variables: Local variables are declared with Java-style syntax. As with Java, multiple variables can be declared and initialized in a single statement.
In Apex,Variables are used to store or hold the values and data type determines what type of value variable can have.
For example :
integer i =1;
Here i is variable which holds the integer type value .