The underlying mechanisms of gecko adhesion have been investigated through modeling of the three-level hierarchical microstructures under gecko's toe . At the bottom of hierarchy, we show that the peeling strength of a spatula pad for attachment can be 10 times larger than that for detachment. At the intermediate level of hierarchy, we show that the 10 times difference in the peeling strength of a spatula pad for attachment and detachment leads to a 100 times difference in adhesion energy at the level of seta. At the top of hierarchy, the attachment of a gecko toe is modeled as a pad under displacement controlled pulling, which yields an adhesive strength more than sufficient for gecko's body weight; On the other hand, the detachment is modeled as a pad under peeling, giving rise to a negligible peel-off force. The present study reveals that the hierarchical microstructures play critical roles in providing gecko with robust attachment and easy detachment.