Given a $C^k$-smooth closed embedded manifold $mathcal Nsubset{mathbb R}^m$, with $kge 2$, and a compact connected smooth Riemannian surface $(S,g)$ with $partial S eqemptyset$, we consider $frac 12$-harmonic maps $uin H^{1/2}(partial S,mathcal N)$. These maps are critical points of the nonlocal energy begin{equation}E(f;g):=int_Sbig| ablawidetilde ubig|^2,dtext{vol}_g,end{equation} where $widetilde u$ is the harmonic extension of $u$ in $S$. We express the energy as a sum of the $frac 12$-energies at each boundary component of $partial S$ (suitably identified with the circle $mathcal S^1$), plus a quadratic term which is continuous in the $H^s(mathcal S^1)$ topology, for any $sinmathbb R$. We show the $C^{k-1,delta}$ regularity of $frac 12$-harmonic maps. We also establish a connection between free boundary minimal surfaces and critical points of $E$ with respect to variations of the pair $(f,g)$, in terms of the Teichmuller space of $S$.