When I receive my green card, do I have to stay in the U.S.?

After receiving your green card you can travel freely to and from you native country, so your travel is not restricted.  You must, however, establish residency in the United States and make the U.S. your permanent home, otherwise you risk losing your immigration benefits.