(20121012, after the question edit) Here's the right figure drawn trying to stick to TikZ's basics. But, here and there I couldn't resist throwing in one of the non-basic features. (Also, normally I would try to do the same thing in the same way, but here I tried to do the same thing in different ways, so that you can pick which one you like.)

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,positioning}
\begin{document}
\begin{tikzpicture}[node distance=1cm,auto]
\tikzset{o/.style={rectangle,draw,minimum size=6mm,rounded corners=1pt,thick}}
\tikzset{a/.style={->,>=stealth',shorten >=1pt,thick,draw}}
\node[o] (f1) {$f$};
\node[o] (g1) [below right=of f1] {$g$};
\node[o] (f2) [below left=of g1] {$f$};
\node[o] (f3) [below=of f2] {$f$};
\node[o] (g2) [below=of f3] {$g$};
\node[o] (g3) [below=of g2] {$g$};
\path[a] (f2.180) ..controls+(-1.5,0)and+(-1.5,0).. coordinate (foo) node[pos=.25]{$T$} node[pos=.75]{$T\times T$} (f1.150);
\path[a] (foo) ..controls+(.5,.5)and+(-1,0).. (f1.210);
\path[a] (f1.0) to[out=0,in=90] node{$S$} (g1.90);
\path[a] (g1.270) to[out=270,in=0] node{$S$} (f2.0);
\coordinate (f23) at ($(f2)!.5!(f3)$);
\path[a] (f2) to node{$T$} (f23);
\path[a] (f23) to[out=225,in=90] (f3.120);
\path[a] (f23) to[out=315,in=90] node[pos=.85] {$T\times T$} (f3.60);
\path[a] (f3) to node{$S$} (g2);
\path[a] (g2) to node{$S$} (g3);
\path[a] (g3) to node{$S$} +(0,-1);
\end{tikzpicture}
\end{document}
(Old answer here.) Here's one that uses only basic TikZ.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikzset{fun/.style={draw,thick,rectangle,minimum size=1cm}}
\node[fun] (f) at (0,0) {$f$};
\node[fun] (g2) at (2,2) {$g^2$};
\node[fun] (h) at (2,-2) {$h$};
\path
(f) edge[->,bend left=80] (g2.west)
(f) edge[<-,bend right] (g2.west)
(g2) edge[<-,very thick,dashed] (h);
\draw[<->] (f) |- (h);
\end{tikzpicture}
\end{document}