You can create a square, and then, using the *Pen tool* (<kbd>P</kbd>) create a bunch of anchor points to make different triangles like so:

[![GIF showing creation process][1]][1]

Even before you've added in color it gives the perception of 3D.

___

You can *then* go to the **Pathfinder Panel** (<kbd>Ctrl/Cmnd</kbd>+<kbd>Shift</kbd>+<kbd>F9</kbd>)  and use the *Divide* option.

Ungroup and color with different gradients - at different angles to better make it appear 3D.

___
**In this exact example, this is how I recreated it:**

1. Crated triangle and rounded the corners

2. Added in some lines using the pen tool and broke up the shapes using pathfinder (or shapebuilder)

3. Applied gradients

[![enter image description here][2]][2]


  [1]: https://i.sstatic.net/P5h0b.gif
  [2]: https://i.sstatic.net/isLzZ.png