My check battery and oil light came on red. Then turned off?

When I was leaving out when I turn my car on the oil and Battery lights were on red and my car wouldn't move.

then I turned it off and restarted it and then the lights went away and then I turned it off and restarted again and the same thing the lights were gone. What does that mean?

I have a Honda Accord.

Read more: My check battery and oil light came on red. Then turned off?