Microfluidic probes are an emerging tool used in a wide range of applications including surface biopatterning, immunohistology, and cell migration studies. They control flow above a surface by simultaneously injecting and aspirating fluids from a pen-like structure positioned a few tens of microns above a surface. Rather than confining flows inside microchannels they rely on recirculating flow patterns between the probe tip and the substrate to create a hydrodynamic flow confinement (HFC) zone in which reagents can be locally delivered to the surface. In this paper, we provide a theoretical model, supported by numerical simulations and experimental data, describing the extent of the HFC as a function of the two most important probe operation parameters, the ratio of aspiration to injection flow rate, and the distance between probe apertures. Two types of probes are studied: two-aperture microfluidic probes (MFPs) and microfluidic quadrupoles (MQs). In both cases, the model yields very accurate results and suggests a simple underlying theory based on 2D potential flows to understand probe operation. We further highlight how the model can be used to precisely control the probe's 'brush stroke' while in surface patterning mode. The understanding of probe operation made possible through the provided analytical model should lay the bases for computer-controlled probe calibration and operation.