Inline Listings:
If you want inline listings you can use \lstinline{listing content}. If the content of the listings contains curly braces you could actually use a different character to delimit the start and end as in \lstinlinelisting content with {}`:

Code:
\documentclass{article}
\usepackage{listings}
\usepackage{xcolor}
\lstset{basicstyle=\ttfamily\small\color{blue}}
\begin{document}
To have inline listings use \lstinline{listing content} to get the formatting.
To have inline listings use \lstinlinelisting content with {} to get the formatting.
\end{document}
Displayed Listings:
For displayed listings, you need to use
\begin{lstlisting}
... code to be formatted ...
\end{lstlisting}
or you can define your own environment via \lstnewenvironment.

Code:
\documentclass{article}
\usepackage{listings}
\usepackage{xcolor}
\lstset{basicstyle=\ttfamily\small\color{blue}}
\begin{document}
\noindent
For displayed listings use \verb|\begin{lstlisting} ... \end{lstlisting}|
\begin{lstlisting}
listing content
\end{lstlisting}
to get the formatting.
\end{document}
listingsmaterial is like verbatim. – egreg Jun 13 '12 at 15:10\code{foo}with respect to\begin{lstlisting}foo\end{lstlisting}? Particularly whenfoois several lines. If you need to get "inline" listings, consider the command\lstinline. – egreg Jun 13 '12 at 15:15