When you burn the midnight oil what you are doing is working very hard; working late into the night.
Here are a few examples. *With exams around the corner, Revathi has been burning the midnight oil. *The assignment is due tomorrow. I guess I will have to burn the midnight oil tonight. *With two of his workers on leave, poor John has been forced to burn the midnight oil.
This idiom has been part of the English language for several centuries. The expression came into the language when there was no electricity. People depended on oil lamps and candles for light. Whenever you wanted to work late into the night, you had to keep the lamps burning.