A right circular cone is inscribed in a right prism as shown. What is the ratio of the volume of the cone to the volume of the prism? Express your answer as a common fraction in terms of $\pi$. [asy]
import three; import graph3;
defaultpen(linewidth(0.8));
size(200);
draw((0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--cycle);
draw((0,0,1)--(1,0,1)--(1,1,1)--(0,1,1)--cycle);
draw((0,0,0)--(0,0,1)); draw((1,0,0)--(1,0,1)); draw((1,1,0)--(1,1,1)); draw((0,1,0)--(0,1,1));
draw(Circle((0.5,0.5,0),0.5),dashed);
draw((0.5,0.5,1)--(0.5,0,0),dashed); draw((0.5,0.5,1)--(0.5,1,0),dashed); draw((0.5,0.5,1)--(1,0.5,0),dashed); draw((0.5,0.5,1)--(0,0.5,0),dashed);
[/asy]
Since the cone is tangent to all sides of the base of the prism, the base of the prism is a square.  Furthermore, if the radius of the base of the cone is $r$, then the side length of the square is $2r$.

Let $h$ be the common height of the cone and the prism.  Then the volume of the cone is \[\frac{1}{3} \pi r^2 h,\] and the volume of the prism is $(2r)^2 h = 4r^2 h$, so the desired ratio is \[\frac{\frac{1}{3} \pi r^2 h}{4r^2 h} = \boxed{\frac{\pi}{12}}.\]