This 5w-40 is the grade/viscosity of oil.
Engine oil viscosity or grades are represented buy these numbers like 0w-20,5w-30,10w-40,20w-50 etc.
The number before 'w' represent the viscosity of oil at cold temperatures & the second number after the 'w' represent viscosity of oil at 100degree C.
0w-20 is the most thinnest oil mostly for new cars or hybrids vehicles.
20w-50 is the most thickest for old engines.
So 0w-20 is thinner than 5w-30.
5w-30 is thinner than 10w-40.
10w-40 is thinner than 20w-50.
Recommended oil for your car is 5w-30 or 5w-40.