For every action there is an opposite and equal reaction. Your foot pushes on the boat and the boat pushes against the water which doesn't have much friction, so the boat moves backward instead of you moving forward. On land, the land pushes back up at you with the same force so you move forward.