Sonic the hedgehog may have his origins in Sega's attempt to rival Nintendo's Mario (ah the old rivalry) but he has enough originality to completely distinguish him from Mario. Sonic's popularity is unquestionable and although he was designed to beat Mario at his own game (pardon the pun), he has become an icon in his own right.
A classic Sega vs. Nintendo face off happens when Sonic and Mario are compared. While being vastly different from each other in almost every possible aspect, their connection cannot be denied. So let's look at how they are similar (and it is a very short list).
They both feature in their own platformer or side-scrolling game. They are both trying to save something, even though the 'things' are vastly different from each other. The game level designs follow similar principles - they both get tougher as the levels progress and they are both without game save slots. So once you start playing, you either finish the game or get a 'game over' somewhere in the middle and start over. But these are features of most platformer games of that era and hence counting them as similarities is stretching it a bit.
Now we can come to the differences and here's where things get exciting. This is where the differences between Sega and Nintendo clearly show. Nintendo has always been inclined towards making games that are more - "everybody-friendly" shall we call it. They do not feature any violence (more or less) and are generally very happy happy. Of course, Zelda notwithstanding. Just look at the latest series of Nintendo games with which the Wii was marketed.
The Mario brothers are actually a little boring when compared to Sonic the hedgehog. The original Sonic game was the first ever game of its kind to bring in the element of speed in the equation. So while you have to press a modifier key to make Mario run, Sonic never quite 'walks'. In fact you can't get anywhere within a Sonic game if you don't have Sonic up and running.
Then comes tackling bad guys. Sonic rolls himself into fierce ball of spikes that hurls itself against the enemy at top speed. Mario jumps on the bad guys head, killing the poor fellow or knocking it out of the scene. Of course, the difference here is the aggression that Sonic shows in his character. Sonic can't even stay still, he is always moving, raring to go. Mario is perfectly content with standing very still for the dangerous plant to move down again.
The character design in Mario is meant to appeal to almost everybody but Sonic seems to be geared at the more adventurous and fast paced gamers who are more likely to be teenagers. However, over the years, Sonic has developed a cult following that goes beyond all age barriers. So now you have 11 year olds to 41 year olds, all gushing about how cool the blue dude is. Of course, the latter would probably do it anonymously!