What does a battery light and oil light that turn on a 2012 ford Fusion se mean?

Yesterday I was at a stop sign and my car was on and the engine turned off and the battery and oil light came on so I turned off the car and turned it back on and it was working again so I decided to go to autozone so then I had them check the battery and they told me the battery was good and the alternator was good then they checked the car for any codes and it had 0 codes so I don't know what's wrong with my car it still runs but it shut off on me twice yesterday

The lights came on simply because the engine died but the key was on. Not related to why the engine died. And no, I have no idea why it shut off

You're incredibly stupid and unobservant. Next time you go to start your car, turn the key to the first "on" position without turning it all the way to start. Notice how all the warning lights on the dash light up? That tells you the lights are not burned out. When you start the car, they go out if the alternator is charging the battery and if the engine has sufficient oil pressure. Now turn the ignition switch part way off to where it kills the engine but doesn't turn off the electrical system. Notice how those lights come back on again? This is because, without the engine running, the alternator and oil pump are not being turned by the engine.

Get it now? It's not rocket science. Duhh!

As for why your engine is stalling (that's the correct terminology), we can't tell you because you haven't provided any useful information, like under what circumstances it happens. Only while idling? Only when the engine is cold and hasn't warmed up? Only when the engine is warm but not cold? Only when certain equipment is turned on, such as air conditioning, heater blowers, or headlights? Think, man, THINK. I know it's hard for you but at least try.

It means those lights are good and operating the way they should.

It sounds like you have a brain box getting ready to go out on it.