Redistricting is the process of setting the boundaries of districts. This has to be done for two principle reasons:
1. To adjust for population changes over time. This is undisputed.
2. It can be argued that this also makes sense to group together areas that have similar concerns -- in an extreme example, separating primarily agricultural districts from primarily urban districts. This is relatively uncontroversial.
Gerrymandering is a term that describes a third reason:
3. Redistricting with the intent of producing a bias towards a particular party. This is pretty uncontroversially considered bad.
It's difficult to prove that this is happening; that's what this whole case is about, or at least a subset of it. Namely, to establish the "efficiency gap" as a metric on a state-wide basis for saying whether the redistricting is trying to do #3 in the guise of doing #2.
Many proposed solutions to the redistricting problem attempt to take some basic heuristic and apply it in an objective way, but although it's possible to solve #1 pretty easily, solving #2 is inherently subjective and that's where the wiggle room for #3 is created.