Is the galaxy made of a nebula or the solar system? My book says on the topic 'Formation of stars' that a galaxy starts forming by the accumulation of hydrogen gas in the form of very large clouds called nebulae. Then local lumps of gas are formed. These lumps start getting even denser and eventually form gaseous bodies called stars. 

That seems a fair explanation but in the topic 'Our solar system' my book says "The nebula from which our Solar system is supposed to have been formed, started its collapse and core formation some time 5-5.6 billion years ago and the planets were formed about 4.6 billion years ago."

So, is the nebula being talked about in the topic 'Formation of stars' same as the nebula being talked about in the topic 'Our solar system'?

This question came to my mind because the nebula being talked about in 'formation of stars' topic might be very large, but when talking about our solar system it is eventually formed into the Sun, so how can they talk about the nebula while describing about our solar system, as the solar system is something within our galaxy.

Any picture helping to visualize will be very nice.
No, those are two different nebulae.  There are stars in our galaxy much older than 5.6 billion years.  The problem is that "nebula" is a very generic term, so it can be a whole galaxy or even the remains of a single star.  It's not even clear what is meant by the nebula from which our Sun formed, it could be the giant molecular cloud if our Sun formed in a huge cluster, or it could be something called a "proplyd" (which is much smaller) if the Sun formed in relative isolation.  There are even proplyds that break off from giant molecular clouds in a kind of combined scenario where the GMC forms the proplyd and then the proplyd forms the star.  In any event, it is important to realize that the galaxy formed from a huge nebula some 10 billion years ago, and the Sun formed from a much smaller nebula much later.