Group chat is called Multi-User Chat (MUC) in Openfire. It is based on the XMPP protocol extension specified in XEP-0045: Multi-User Chat. To understand the details of how MUC in Openfire works, I advise that you study that specification.
In its most common form, users join a MUC-Room (“a group chat”) only when they are online. When their client logs off, they leave the room. In this sense, there is not a concept of a user-that-is-in-the-room-but-is-offline.
MUC rooms can have members. That, for instance, can be used to reserve a nickname, or to restrict access to the room. If you make sure that your solution registers your users as members of the room that they are in, then you can detect at any given time what users are ‘offline’. To do that, you can compare the member list of the room with the users that are currently in the room.
Offline users can be sent messages by simply addressing the message to their XMPP address (JID). Whenever the user logs in, its client will be sent the offline messages (see XEP-0160: Best Practices for Handling Offline Messages) This works well in a one-to-one setting, but is not applicable to a MUC setting.
For a user to retrieve messages from a MUC room, it is best to configure Openfire to maintain an archive of messages (normally, Openfire only keeps the last few messages). To do this, you install the Monitoring plugin for Openfire, and configure it to record messages. Among other things, the Monitoring plugin provides functionality as described in XEP-0313: Message Archive Management. A client that joins a MUC room can use that to retrieve all (or part of) the messages that are in the archive of the MUC room.
To send users that are offline a notification that messages are pending, you might need to resort to push notifications. Support for that is provided by the Push Notifications plugin. This plugin currently (version 0.6.0) has only very basic support of the protocol defined in XEP-0357: Push Notifications. Your mileage may vary - and depending on the platform that your client is on, might require extensive development or other components to be installed before you can make this work. Also, I do not believe that it supports sending push notifications based on receiving messages in a MUC room that a user is a member of, but not online in.