A mad scientist is a fictional character who is a genius, but who wants to find out and do what no one else ever has and often what he should not. The character Victor Frankenstein is often said to be the first mad scientist, though Coppelius from The Sandman (short story) could also be called a mad scientist and The Sandman was published a year before Frankenstein was.
They often work with fictional technology, they either fail to recognise the dangers of their actions or don't care about the consequences, and some attempt to play God.
Mad scientists are often shown as evil (evil genius) or insane. Some may be neutral or good, even if their actions are dangerous and irresponsible, which can make them mad scientists.