A guess would be that the program chair is in charge of the technical content (which papers are accepted, etc.) whereas the general chair is in charge of administrative aspects. However, some conferences, like FOCS, list a third group of local arrangements chairs who sound like they are in charge of the administrative side of the conference. Others only have one group of undifferentiated "chairs".
What do each of these jobs entail? Are they considered "equal" in terms of service to the community?
Conferences in theoretical computer science like the ones you mention typically don't have general chairs. They have a local arrangements team for organizing the event, and program chairs to manage the review process.
Many conferences in CS outside theory have a general chair because they have many more activities. The general chair might be in charge of selecting
- The workshop program chair
- The posters chair
- The tutorials chair
- Publicity (and social media) chairs
- Local arrangements
And so on. The general chair can be viewed as being in charge of everything except the technical program and then delegates.
But this may vary even within iterations of an individual conference.