Here, partition(data,i,j,l) partitions array elements A[i] through A[j] around A[l]. It returns k, the index where the partition element ends up.
After partitioning, element k is in its correct, sorted place, all the elements from i to k-1 are less than A[k], and all the elements from k+1 to j are greater than A[k] (and transitively, elements i through k-1).