I have heard that in Greenland there is day for 6 months and night for 6 months. Is this true? If so, how does it happen?
That's not quite correct.
You may have noticed that during summer the days are longer (and the nights shorter) than during winter. That is because the earth's axis is tilted about $23^o$ from the plane of it's orbit around the sun. With this tilt, as the earth travels around the sun the northern hemisphere gets longer days is the north pole is tilted towards the sun. Shorter days happen when it's the reverse. The change happens gradually, with the shortest day at midwinter (approximately 21 December) and the longest day around 21 June. At equinox time (21 March & 21 September) day and night are of equal length.
Once you go north of the Arctic Circle (or south of the Antarctic Circle), which is at $67^o$ north ($67=90-23$), you will find that there are periods of the year when the sun does not rise above the horizon during the day, because the bulge of the earth is in the way. At other times of the year, the sun does not set at all.
However, as in more temperate latitudes, the change is gradual. On 21 December there is indeed no sunlight. Then, as you go into the new year, there comes a day when the sky starts to brighten a bit around noon time. Still later, the sun may come up for a short period. The exact day this happens depends on your latitude (how far north you are). That period gets longer by the day, until on a certain day the sun no longer sets at all, and you have 24 hour daylight. The Arctic Circle is the latitude where there will be a day without sun, and a day without night. Further north more and more days are like that.
Greenland stretches from about $60^o$ to $85^o$ North. Hence the southern end of Greenland always gets at least some sun, even in the middle of winter. ANd, during summer, ther will still be some night.
To add a final bit of confusion: I've been talking all along about the northern hemisphere. If you live in Australia like me, it's the exact reverse. We have winter in June, summer in December.
The 6 months day/night cycle is exactly happening only at the poles (as pointed out in comments). Between the poles and the arctic circle you have a gradual change from 6 month cycle to the 24 hour cycle. Greenland is partially in this area (south Greenland is actually outside the arctic circle). It is happening because the Earth rotational exis is tilted, so the poles are tilted away from (or towards) the Sun every 6 months under such angle, that the Sun light in certain parts of the year does not get into the area beyond the arctic circle.