int is a primitive data type. Variables pf int type store actual byte value for the integer you want to represent.
An integer is a class. Variables of type Integer store references to Integer objects, just as with any other reference type.
To be more specific, Integer is a class with a single field of type int. This class is used where you need an int to be treated like any other object, such as in generic types or situations where you need nullability.
Every primitive type in Java has an equivalent wrapper class:
byte has Byte
short has Short
int has Integer
long has Long
boolean has Boolean
char has Character
float has Float
double has Double
Wrapper classes inherit from Object class, and primitive don't. So it can be used in collections with Object reference or with Generics.
Want to learn Java? Check out the Java certification from Intellipaat.
Since java 5 we have autoboxing, and the conversion between primitive and wrapper class is done automatically.