Green Cards are given to people who have obtained the right to Legal Permanent Resident (LPR) status in the U.S.; this means they have the right to live and work in the U.S. for the indeterminate future.
However, being a permanent resident is not the same as having U.S. citizenship! Both imply residence, employment, and certain rights and benefits, amongst others; but U.S. citizens have the right to vote and cannot have their citizenship taken from them (except in highly exceptional cases which we will disregard here). LPR status holders, in contrast, do still need to keep in line with certain conditions - particularly when traveling abroad.
A Green Card is obtained by successfully applying for and obtaining an immigrant-type visa, with the intention of establishing permanent residence in the U.S.
The most commonly issued immigrant-type visas are family- or employment-based; the path is simply easier if you already have some established ties with the U.S., whether through family or because you have already secured a job.
In addition, each year a certain amount of Green Cards are issued for those applying under the “Diversity Lottery”, wherein people of certain nationalities are able to try their luck with somewhat more relaxed application requirements. Of course, since it’s a lottery, there is no guarantee whatsoever that you will be successful.
As an LPR status holder, you are allowed to live in the U.S., seek employment, receive education, and/or apply for certain benefits that visitors or temporary workers do not qualify for. You can also leave the U.S. for up to 6 months and return without having to apply for an immigrant visa again.
Traveling abroad for longer than 6 months as a Green Card holder is something to be avoided - unless you have taken specific measures to inform authorities and receive permission, your Green Card might get canceled and you may thus lose your LPR status if you remain outside the U.S. for longer periods of time.
Depending on your personal situation and the conditions under which you received permanent resident status, you will be able to apply for U.S. citizenship after either 3 or 5 years of holding your Green Card and living in the U.S.
You can see the LPR status as a type of “probationary period” for prospective new Americans - at least this is somewhat the intention of the program, even though you are in no way obliged to become a U.S. citizen. As long as you don’t leave the U.S. unannounced for long periods of time, and do not commit any felonies that may make you deportable, naturalization is the expected next step for recent immigrants.