This is a quick guide to how to grind your coffee.  It’s a very simplified version. 

You should also consider other factors like the roast level of coffee.  The lighter the coffee is roasted, the finder it should be grind to help in extraction.