Caenorhabditis elegans (C. elegans) is an undulatory nematode which exhibits two distinct locomotion types of swimming and crawling. Although in its natural habitat C. elegans lives in a non-Newtonian fluidic environment, our current understanding has been limited to the behavior of C. elegans in a simple Newtonian fluid. Here, we present some experimental results on the penetrating behavior of C. elegans at the interface from liquid to solid environment. Once C. elegans, which otherwise swims freely in a liquid, makes a contact to the solid gel boundary, it begins to penetrate vertically to the surface by changing its stroke motion characterized by a stiffer body shape and a slow stroke frequency. The particle image velocimetry (PIV) analysis reveals the flow streamlines produced by the stroke of worm. For the worm that crawls on a solid surface, we utilize a technique of traction force microscopy (TFM) to find that the crawling nematode forms localized force islands along the body where makes direct contacts to the gel surface.