I don't believe in like "Harry Potter magic" or anything, but...there are ways. It's impossible to wave a stick around and make a snake appear out of thin air, you can't get something from nothing. Science has been turning matter into energy for a very long time though. Atomic energy is a great example of this, hell even simpler than that is a basic fire. Scientists are now discovering ways to convert energy back into matter (sorry, I don't recall where I read the news article on this so I have no point of reference), basically making things out of thin air. We are finding more and more creative ways to manipulate matter and energy, which is basically exactly what magic is - manipulating matter and energy. Any time you use a remote control you're manipulating energy, every time you nuke something in the microwave you're altering matter. We just understand it better not. Way back in the day they use to use candles (usually of specific colors), organic matter, and "spells" to try to achieve the same thing as we now use electronic devices for. The way I see it old school magic does work, it's just that trying to use magic to accomplish something is like trying to kill a rabbit in the woods on a rainy night using a sharpened stick, while using scientific means is more akin to killing a deer in an open field in broad daylight using a sniper riffle. Both things have the potential of getting you meat for dinner, it's just that one has a much higher probability to get you a far greater reward with significantly less effort.
A more scientific explanation on magic - candles emit heat energy, certain colors affect light waves at different frequencies, chanting emits sound waves, etc. It's all an attempt (albeit not a very effective one) to utilize different energy sources to influence the physical world around us. A popular reference to chaos theory is that of the butterfly causing a hurricane, I could see magic as working in much the same way.
Also since this is a thread on religion I could add this. Our psyche is nothing more that electrical pulses and chemical reactions housed inside our skulls. Essentially our consciousness in nothing more or less than raw energy. With all the different kinds of energy that we know are bouncing all over damn planet, let alone flying across the entire freaking universe, why would anyone assume that sentience is tied specifically and exclusively to biological beings? I'm not saying that something like the sun, or wind might hold some kind of intelligence or anything, or that there's spirits living in people's houses, but I see it as a very real probability that there are sentient beings somewhere in the universe made from pure energy without a "physical" form.
Just my $0.02, cause hey, you asked.