confidence intervals

when constructing confidence intervals, how to you know whether to use the standard error or the standard deviation?

See this thread: http://www.analystforum.com/phorums/read.php?11,759155.