It is actually a stem plant, belonging to the genus Hygrophila, not a fern. Ferns grow via a rhizome which attaches to rocks or wood and creeps along the surface, and the leaves unfurl from the rhizome. There are also plants called ferns that aren't ferns, like Indian Fern for example.