The Korteweg-deVries equation with step type boundary conditions is considered, with an emphasis on soliton dynamics. Solitons and continuous spectra are always present together. Solitons can pass through a step, in this case, the phase shift is calculated. Solitons can also become trapped, in this case, the corresponding eigenvalues of the Schrodinger equation are embedded in the continuous spectrum. The above results are confirmed numerically. For small dispersion, the above dynamics are described analytically.