This paper aims to analyze the GPS traces of 258 volunteers for a better understanding of both the human mobility patterns and the mechanism. We report the regular and scaling properties of human mobility from several aspects, and importantly we find its levy flight characteristic which is consistent with the previous studies. We further assume two factors that may govern the levy flight property: (1) the scaling and hierarchical properties of the purpose clusters which serve as the underlying spatial structure, and (2) the individual preferential behavior. To verify the assumptions, we implement an agent-based model with the two factors, and the simulated agents indeed reproduce the same levy flight pattern as the observed one. In order to enable the model to reproduce more mobility patterns, we add the model a third factor, the jumping factor which means the probability that one person may cancel the regular mobility schedule and visit a random place. With this factor, our model could cover a relatively wide range of human mobility patterns with exponent values from 1.55 to 2.05.