The task bar lets you access other apps when you’re using an app and your phone is unfolded. It never appears when your phone is closed.

You can control whether it appears when your phone is unfolded:
Tap Task bar and adjust settings:
Adjust settings:
Fold your phone for a laptop-like experience with an app on the top screen, and controls on the bottom screen.

When you fold your phone in this configuration, if you’d prefer for the app to wrap onto the bottom screen instead, then turn off Laptop mode.
To see a touchpad and keyboard on the bottom screen when folded, keep it on .
To wrap the app onto the bottom screen, turn it off 
Lock your phone, then fold it into a tent and set it on your desk or bedside-table as a clock or music player.

To enable/disable this feature:
Turn Use desk display on 
If you turn it off, then your screen stays dark if you fold it into a tent. This saves battery life but removes features.
To change what’s on the display when you’re not playing music:
Choose the layout:
For a calendar and clock and icons when you receive notifications, choose Dashboard.
For a calendar and clock, choose Dashboard and turn Show notification off 
To see only a clock, choose Classic.
Your choice of layout determines whether you see notifications or not.
If you’re using Dashboard and have Show notification on 
If you want a fuller music experience, you can display album art when you're playing music during Desk display.
Turn Show album cover when playing music on 
To see your clock, even when playing music, turn Show album cover when playing music off 
When you fold your phone, you can continue using apps without interruption, because the same app will appear on the external display, sized down to fit that screen.
To change what happens when you close the phone:
Tap App continuity and adjust settings:
If you want the smoothest transition from main screen to the external display when using an app, keep App continuity set to Always continue.