Dear Min,
While network discovery is used to check for the presence of networks within the device’s range, the formation is used by the coordinator to start/form the network. You will find this information in ZigBee specification from ZigBee Alliance. Here are some extracts from such document:
3.2.2.1 NLME-NETWORK-DISCOVERY.request
This primitive allows the next higher layer to request that the NWK layer discover networks currently operating within the personal operating space (POS).
3.2.2.3 NLME-NETWORK-FORMATION.request
This primitive allows the next higher layer to request that the device start a new ZigBee network with itself as the coordinator and subsequently make changes to its superframe configuration.
It is important for any ZigBee developer to read the specification and be familiar with its implementation. I would recommend you to download it form ZigBee Alliance website and check these and other details. It will be very helpful to clarify your doubts.
Regards,
AngelC