  We study the interplay between electron correlation and disorder in the
two-dimensional Hubbard model at half-filling by means of a variational wave
function that can interpolate between Anderson and Mott insulators. We give a
detailed description of our improved variational state and explain how the
physics of the Anderson-Mott transition can be inferred from equal-time
correlations functions, which can be easily computed within the variational
Monte Carlo scheme. The ground-state phase diagram is worked out in both the
paramagnetic and the magnetic sector. Whereas in the former a direct
second-order Anderson-Mott transition is obtained, when magnetism is allowed
variationally, we find evidence for the formation of local magnetic moments
that order before the Mott transition. Although the localization length
increases before the Mott transition, we have no evidence for the stabilization
of a true metallic phase. The effect of a frustrating next-nearest-neighbor
hopping $t^\prime$ is also studied in some detail. In particular, we show that
$t^\prime$ has two primary effects. The first one is the narrowing of the
stability region of the magnetic Anderson insulator, also leading to a
first-order magnetic transition. The second and most important effect of a
frustrating hopping term is the development of a ``glassy'' phase at strong
couplings, where many paramagnetic states, with disordered local moments, may
be stabilized.
