Which package can be used to draw automata?

TiKZ has a whole library for drawing automata:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\begin{document}
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto] 
   \node[state,initial] (q_0)   {$q_0$}; 
   \node[state] (q_1) [above right=of q_0] {$q_1$}; 
   \node[state] (q_2) [below right=of q_0] {$q_2$}; 
   \node[state,accepting](q_3) [below right=of q_1] {$q_3$};
    \path[->] 
    (q_0) edge  node {0} (q_1)
          edge  node [swap] {1} (q_2)
    (q_1) edge  node  {1} (q_3)
          edge [loop above] node {0} ()
    (q_2) edge  node [swap] {0} (q_3) 
          edge [loop below] node {1} ();
\end{tikzpicture}
\end{document}  

output of code


using xy-pic package available at ctan for automata diagrams. enter image description here

\documentclass[12pt]{article}
\usepackage[all]{xy}
\begin{document}
\xymatrix@ur@!R=2pc{%
*+<1pc>[o][F-]{q_0}  \ar@(l,l)[]^<<<<{start} \ar@/^/[r]^0  \ar@/_/[d]_1 
& *+<1pc>[o][F-]{q_1} \ar@(ul,ur)[]^{0}  \ar@/^/[d]^1 \\
*+<1pc>[o][F-]{q_2} \ar@(dr,dl)[]^{1} \ar@/_/[r]_0 
& *+<1pc>[o][F=]{q_3} }
\end{document}

If you want great diagrams without having to write the code for it, check out this tool:

http://madebyevan.com/fsm/.

You can make your diagram by clicking and dragging, then export it as LaTeX (it uses TiKZ, just like the answer by @Alan Munn).