If in the position you are talking about, the King is NOT in check(under attack) and has no legal move then the game is a Stalemate(Draw). To win you must have the king in check with no way for him to get out of check.
This is a good website to learn the basics Chess is Fun(
http://www.princeton.edu/~jedwards/cif/intro.html ).
HTH
Wayne