stalling problem

I drive a 2010 Buick Lucerne. It has randomly started stalling on me. I can sometimes smell a burning smell but then other times I don't notice it. What can I do to narrow down what could be causing this because I would like to get it fixed.
The engine needs spark, fuel, and air to run. You need to find out what you are losing to make it stall. In general, a loss of fuel pressure will result in rough running then stalling. Loss of spark will cause an instantaneous stall. Is the CEL on?