About disconnect

How does the openfire judge that one client is disconneted? What does the openfire do after judging the client has

disconnected?