You can get it back online by changing the profile to anything else other than Offline. To do this, briefly press the power button. This bring up a menu. Select another profile, say General.
There are also other reasons why your phone stays in Offline mode even when you do that. The most common of these would be a problem with your sim card.