The ADCP does not measure horizontal or vertical velocities at a point but determines Doppler shifts along three to five acoustic beams that are typically slanted (most commonly 60°) from the horizontal plane and spaced around the horizontal compass. The most typical configuration (Janus) includes four orthogonal beans. The Doppler shifts measure slant velocities of suspended acoustic backscattering particles moving with the water relative to the instrument. Pairs of slant velocities are combined to produce vertical and horizontal velocities. The underlying assumption is that velocities are horizontally uniform over the beam separation. Other instruments (e.g., Teledyne Sentinel V ADCP) have an integrated fifth beam to provide a third vertical velocity measurement.
Indirect estimates of vertical velocities can be obtain in several ways. The most common approach is to take advantage of the principle of conservation of mass (continuity equation, as described in the answer by Neo). $$ \dfrac{\partial w}{\partial z} = -\dfrac{\partial u}{\partial x}-\dfrac{\partial v}{\partial y} $$ where $w$ is the vertical velocity. Assuming $w=0$ at the bottom, then measuring the horizontal velocities throughout the water column will give you an estimate of the vertical velocity. This method, while useful, tend to produce really noisy results as the vertical velocities in the ocean tend to be quite small and are masked by the noise in the horizontal measurements.
A completely different approach was recently introduced by Klein et al. (2009). It uses the surface Quasi-Geostrophic approximation to estimate low-frequency vertical velocities in scales between 20 km and 400 km from the surface down to 500 m. The needed data is some high-resolution Sea Surface Height (SSH, usually from satellites) and an approximation of the large-scale vertical stratification. Vertical velocities are estimated from the buoyancy equations at the surface and at depth in a modified version of the Omega equation (Hoskins et al., 1985).