Heterogeneous nucleation is studied by Monte Carlo simulations and phenomenological theory, using the two-dimensional lattice gas model with suitable boundary fields. A chemical inhomogeneity of length b at one boundary favors the liquid phase, while elsewhere the vapor is favored. Switching on the bulk field Hb favoring the liquid, nucleation and growth of the liquid phase starting from the region of the chemical inhomogeneity are analyzed. Three regimes occur: for small fields, Hb < Hbcrit, the critical droplet radius is so large that a critical droplet having the contact angle θc required by Young's equation in the region of the chemical inhomogeneity does not yet "fit" there since the baseline length of the circle-cut sphere droplet would exceed b. For Hbcrit < Hb < Hb*, such droplets fit inside the inhomogeneity and are indeed found in simulations with large enough observation times, but these droplets remain pinned to the chemical inhomogeneity when their baseline has grown to the length b. Assuming that these pinned droplets have a circle cut shape and effective contact angles θeff in the regime θc < θeff < π/2, the density excess due to these droplets can be predicted and is found to be in reasonable agreement with the simulation results. On general grounds, one can predict that the effective contact angle θeff and the excess density of the droplets, scaled by b, are functions of the product bHb but do not depend on both variables separately. Since the free energy barrier for the "depinning" of the droplet (i.e., growth of θeff to π - θc) vanishes when θeff approaches π/2, in practice only angles θeff up to about θeffmax ≃ 70 were observed. For larger fields (Hb > Hb*), the droplets nucleated at the chemical inhomogeneity grow to the full system size. While the relaxation time for the growth scales as τG ∝ Hb-1, the nucleation time τN scales as ln N ∝ Hb-1. However, the prefactor in the latter relation, as evaluated for our simulations results, is not in accord with an extension of the Volmer-Turnbull theory to two-dimensions, when the theoretical contact angle θc is used.