How long can a permanent resident live outside the USA without losing Green Card???

I’m a permenant resident of The USA. It means that I have a green card. I would like to know, if I want to go back to my hometown, how long I can stay in my hometown and come back to Los Angeles. And how to do not to lose my green card. How many months I should stay in my hometown, and how long I should stay in Los Angeles??? Please help :slight_smile:
And one question also: “Will I be a citizen after 5 years???”