From the University of Florida Institute of Food & Agricultural Sciences:
Despite its name, Spanish moss is not a moss but a bromeliad — a perennial herb in the pineapple family. Most bromeliads, including Spanish moss, are epiphytes. Epiphytes grow on other plants, but do not rely on them for nutrients. They take nutrients from the air and debris that collects on the plant. Spanish moss has permeable scales that “catch” moisture and nutrients. Spanish moss prefers moist environments, but its ability to trap water lets it survive dry periods. The plant can also go dormant until moisture conditions improves. Spanish moss does not have any roots. It attaches to substrates by wrapping its stems around a surface. Also, it does not need roots for water and nutrient uptake, since all parts of Spanish moss have that ability. Spanish moss is commonly found on oak and cypress trees, but can grow on other plants as well.