A number you select to make it your focus on that iteration.
Meanwhile, the rest of the array is unordered (or not), the pivot ends its iteration on the right place. Why? Because you put everyone smaller than it on its left side, and every bigger element on its right side.
At the end of your iteration, the closer it is to the middle of the selected interval the better.
Getting repeatedly a pivot that ends at one of the extremities of your interval makes the algorithm a lot slower (maybe O(n²), if you are unlucky).
You get the start, the middle and the end of your interval. Then, get the element between the other two. It makes you never get the biggest or the smallest element.
Just pick a random number on the wanted range. It’s almost impossible for it to get the worst scenario every time.
The method that rearranges the array based on the pivot.