What is the Galactic Latitude and Galactic Longitude? How is different from the latitude and longitude we use on Earth? It has to something with the positioning of sun and galactic center of the milky way but I wasn't able to understand how for a given star, its co-ordinates are calculated.

Some explanation would be appreciated.
The Galactic Coordinate system is a longitude-latitude coordinate system that is used to define the positions of objects in space, most commonly objects within our own galaxy. It uses the center of our galaxy as the focal point (i.e., where we consider $(0^{\circ},\:0^{\circ})$), much like we use the position just off Africa as the focal point of the Earth's lon-lat system. You can see a visual representation of this system below.



The reference point is of course from our solar system. Longitude is measured in the plane of the galaxy, going positive as you sweep to the left (thus following a right-hand rule). The symbol $\ell$ is generally used for galactic longitude. Latitude is measured above or below the plane, going positive "above" the plane and negative "below". We define above and below based on the right hand rule as applied to our galaxy's rotation. The symbol $b$ is generally used for galactic latitude.

If someone says an object is at galactic coordinate position $(\ell,b) = (180^{\circ},\:+45^{\circ})$, then the object will be located directly opposite the galactic center and above the plane of the galaxy.

Aside from being a lon-lat system, just as the Earth's is, it does not share any features with Earth's lon-lat system. That is, there's generally no relation between the two and the definition of one is not affected by the other.