To make a long story short, who wins depends on the version depicted.
The Batman I know can defeat Superman because I am a comic collector... but there are many depictions of Batman and Superman in non-comic media. So I understand why others might disagree.
For example, I don't think the movie Batman would or should beat Superman. He can.... but he would not. I do on the other hand think the DCAU Batman would beat the DCAU Superman though. He could lose... but he would win I believe.
The comics Batman would wipe the floor with the comics Superman.. so thats where my bias comes from, but its because of the nature of Batman's power. See, Superman has a set powerset of amazing things he can do, but they have been the same for decades. 90s Superman is about as powerful as 2000 Supes... as 2010 Supes, etc. i.e. His flight and x-ray vision and eye beams aren't getting stronger each issue. They were just strong to begin with.
On the otherhand Batman's power is not fixed. His power is his resources and training. So with each comic he amasses more resources and training.
So year after year his character gets stronger and stronger. He is hoarding more and more crazy technology and mystical artifacts and learning new techniques all the time.
Many don't realize but he has everything at his disposal now from time travel to magic to lantern rings to knowledge of future events... He can put the entire universe to sleep if he wants cause he has sand taken from the hourglass of the Sandman, DC's incarnation of the abstract concept of sleep itself.
He has both a zombie virus AND the cure for it sitting on a shelf in the Batcave.
(from Batman: Contagion). And he has the combined power of all the villains he fights, he just never uses them usually. But he has freeze rays, Bane Venom, lazurus pits to ressurrect himself or should he simply need to regenerate a limb he can do so thanks to the research of poison ivy.
People always pick Supes cause of the ridiculous power he posesses but if they knew half of the overthetop stuff Batman has locked away in the Batcave they would realize that Superman's powers is pretty reasonable by comparason.