As was mentioned Rotman's book is a very good basic book in group theory with lots of exercises.
For finite group theory Isaacs has a relatively new book. I didn't read much from the book, but the little I did, was very nice. Generally, Isaacs is a very good teacher and a writer.
Old fashion references for finite group theory are Huppert's books (the second and third with Blackburn) and Suzuki's books. They are out of print, old fashion and the first of Huppert’s book is in German. But they are encyclopaedic, useful, and popular.
Robinson’s book is a good book especially for infinite group theory, an area which is hard to find in other books.
In my corner of group theory, DDMS, Analytic pro-p groups is standard if you are interested in linear pro-p group, Wilson’s Profinite groups is more general profinite groups theory, and there is also Ribes and Zelesski which I am not familiar with, but I think is more geometric in nature.
A book worth mentioning in my view is Subgroup Growth by Lubotzky and Segal. It contains a lot of group theory and touches on many topics. So by reading it, it is possible to get a good overview of the all area.