A factor is a discrete, categorical variable used to explain a response variable. Factors are said to have some number of levels. Think of levels as groups, the term does not imply hierarchy.