It's pretty simple:
Traverse the triangles of the mesh with any floodfill, shortest ptahs, or spanning tree algorithm. (Important is to go from a triangle to another adjacent triangle but crossing every each only once, until all triangles have been visited.)
During this process create a 2D mesh on the plane, preserving triangle shapes (so same edge lengths and angles). Add adjacent triangles at the traversed edge. You end up with an unfolded mesh with many open edges that need to be glued together to make it back 3D from paper.
Imagine a cube, you would end up for example with the typical cross shape we know from cube map textures. The whole process is indeed equivalent to UV unwrapping, but you are not allowed to skew / distort triangles to reduce the number of open boundary edges.
With more complex shapes you also will get overlaps on the plane, so you need to cut your 2D mesh into multiple pieces to resolve overlaps. Just glue multiple pieces together afterwards from paper. Multiple pieces is unavoidable for any mesh that has genus > 1. (meaning more holes than one - a tours has genus one so one hole, and you can unwarp it without overlaps and the 2D mesh is one single connected surface.)
If you want the optimal solution, minimizing overlaps, number of open edges, or area of required paper, it becomes an NP hard problem. So optimal is not possible, but you'll get good results from greedy algorithms. E.g.: https://www.cs.cmu.edu/~kmcrane/Projects/LoopsOnSurfaces/