Users schedule and customize a message next to their name in Chatter to show the dates and message they are out of the office. You can enable or disable Out of Office in Chatter Settings. Out of Office is available only in Lightning Experience.
Goto Setup -> Chatter Settings -> Click Edit Button -> Out of Office -> Enable Users can set Out of Office messages
Next Find your profile -> Click Out of Office button to set your Out of Office message and this will appear in your profile
Out of Office Message:
Check Set Out of Office Message -> Fill all the necessary information -> Click Save