Definition of an Algebraic Objects How did the definition of Algebraic objects like group, ring and field come up? When groups were first introduced, were they given the 4 axioms as we give now. And what made Mathematicians to think of something like this.

Let me address the question: "what made Mathematicians ... think of something like this"?
The answer is: Galois, in studying the problem of factorization of polynomials, realized that
reasoning about the symmetries of the roots could be more powerful a tool than studying explicit formulas (which, loosely speaking, had been the basic method in the theory of equations up to that time).  
As this structural/conceptual point of view began to reveal its power in solving difficult concrete problems, more and more mathematicians began to think in this way.  The structural concepts were then isolated from their concrete settings, and this is how they are taught today.  But the motivation was, and for many remains, the applications of these abstract notions to concrete problems.  (A standard but helpful example is the pivotal role that group theory, Galois theory, cohomology, and ring theory played in the proof of Fermat's Last Theorem.)  
Furthermore, nowadays we train ourselves and our students to recognize any hint of structure in a problem, and to exploit such structure to the hilt.  So these concepts have become basic tools in the problem-solving toolkits of contemporary mathematicians.
