Setinterval

can some one explain more detail how a setinterval function work?

if ,

setinterval(f1,1000)
function f1()
{
…
setinterval(f2,2000)
function f2()
{
…
}
}

what will happen , and how is this work? thanks