. -> this refers to css for a class
its for specifying css for elements that has the class set in that name. 
Multiple elements can have same class
For example
<div class='xyz'></div>
<div class='xyz'></div>
<div class='xyz'></div>
by writing 
.xyz
{
width:100px;
height:100px;
}
we can have common width height for all those div
# refers to ID
ID is unique
Only one element can have an ID in a html page
its for applying css properties pertaining to one particular element
for example
<div id="div1" class='xyz'></div>
<div id="div2" class='xyz'></div>
<div class='xyz'></div>
by writing 
.xyz
{
width:100px;
height:100px;
}
#div1
{
width:200px;
}
we will have div1 width as 200!
CSS properties with # have more priority than . 
>
  i.e # css will overwrite . Css
look at this example jsfiddle
http://jsfiddle.net/rbyKx/