  For a Markov chain $Y$ with values in a Polish space, consider the entrance
Markov chain obtained by sampling $Y$ at the moments when it enters a fixed set
$A$ from its complement $A^c$. Similarly, consider the exit Markov chain,
obtained by sampling $Y$ at the exit times from $A^c$ to $A$. This paper
provides a framework for analysing invariant measures of these two types of
Markov chains in the case when the initial chain $Y$ has a known
$\sigma$-finite invariant measure. Under certain recurrence-type assumptions
($Y$ can be transient), we give explicit formulas for invariant measures of
these chains. Then we study their uniqueness and ergodicity assuming that $Y$
is topologically recurrent, irreducible, and weak Feller.
  Our approach is based on the technique of inducing from infinite ergodic
theory. This also yields, in a natural way, the versions of the results above
(provided in the paper) for the classical induced Markov chains.
  We give applications to random walks in $R^d$, which we regard as
"stationary" Markov chains started under the Lebesgue measure. We are mostly
interested in dimension one, where we study the Markov chain of overshoots
above the zero level of a random walk that oscillates between $-\infty$ and
$+\infty$. We show that this chain is ergodic, and use this result to prove a
central limit theorem for the number of level crossings for random walks with
zero mean and finite variance of increments.
