-8c means -8 times c. The c is a placeholder for a number. Think of it as a box that holds the number.
The value that goes in the box is 5 because -8 times 5 = -40. We can find this through trial and error. Or the best way is to divide both sides by -8. Why divide? Because we want to undo what is happening to the variable to isolate it.
So divide both sides by -8 to get...
-40 = -8*c
-40/(-8) = -8*c/(-8)
5 = c
c = 5
And as a check, we can plug this value of c back into the original equation
-40 = -8*c
-40 = -8*5
-40 = -40
so the answer checks out