How do pineapples and lemongrass grow?
First, allow me to provide the link to an old paper that deals with development in Ananas comosus, it should be freely available and answer this question in more detail: http://onlinelibrary.wiley.com/doi/10.1111/j.1469-8137.1936.tb06884.x/pdf

Now, to briefly explain the observation that a mature plant will grow from the region where the leaves of the pineapple attach to the fruit, it should be noted that the pineapple fruit develops at the top of the central stem of the plant in a developmental process known as influorescence (please see a picture of a pineapple plant). Since the top portion of the fruit is in fact the end of the primary stem, this region contains the apical meristem, a collection of stem cells that are apparently is sufficient to give rise to a mature organism. Pineapple development has apparently been a topic of constant research for nearly a century (due to its economic importance), so there are quite a number of papers that can provide much more detail, but many of these are not freely available.

In nature the primary means of pineapple propagation is the formations of lateral shoots, the growth of which consequently are accelerated by influoresence of the main shoot.

Now the actual way the plant grows is not quite as simple to answer, as plant development is often as complicated as animal development, but in general it is a function of cell division and elongation. In the root apical meristem, there is a region known as the quiescent centre which contains the actual root stem cells. Directly behind the quiescent centre is a region known as the merismatic zone, which features extensive cell division, and directly behind that is the elongation region where the cells grow, effectively pushing the root tip through the soil. In the region behind the elongation region, the maturation zone where the cells have reached full length, cells begin to form more rigid cell walls and differentiate into the different tissues of the root.

The shoot apical meristem is dome-shaped, the top of the dome is known as the central zone and is analogous to the quiescent centre of the root apical meristem, the sides of the dome are the peripheral zone, a region of rapidly dividing cells that give rise to the leaves, and the central region of the dome is the rib zone that gives rise to the stem structures. Elongation, differentiation, and maturation also occur below the meristem region, but involve the additional complexities of leaf organogenesis.

There should be considerable additional information on plant development online.