There are two separate fundamentals of making sure your fabric is "on grain." First, your fabric needs to be cut or torn on grain, and two your fabric needs be oriented on grain, or "blocked" (read tutorial on "Blocking Your Fabric"). For all of this to really make sense, you will want to understand concepts of warp, weft, and selvage (for that go "becoming oriented with your fabric: warp, weft, and selvage).
The first step of the two to get your fabric "on grain" and ready to be cut into pattern pieces, is making sure you have a perfect rectangle in terms of the number of warp threads, and number of weft threads. You already know you have a consistent amount of warp threads due to the way it is weaved on a loom. But what about the weft. Imagine your fabric being cut on a slight angle at the fabric store. It is your job as the garment constructor to correct this.
The ideal way fabric should be cut in order to be a perfect rectangle with equal number of threads across the weft/crosswise grain is cutting exactly along one thread across the entire width of fabric. That seems pretty tricky.
Luckily, many woven fabrics are torn relatively easy including cotton shirting and cotton lawns (unfortunately fabrics like linen and gauzes do not tear well, although linen/cotton blends can tear okay).
The best way to tear your fabric is to snip into your fabric about 1 inch, then tear the rest of the way across the fabric. The fabric will naturally tear between two weft threads. Do this to both ends of your fabric along the crosswise grain.
Not so lucky on the other hand is certain fabrics that do not tear well. This includes most linens. If you tear linen it will warp along the torn edge drastically and will not be pleasant to work with. The best options you have are to either do your best to cut perfectly perpendicular to the lengthwise grain/selvage, or you can pull a single thread across the fabric revealing a subtle line to follow with scissors. Do I recommend the later option, I really cannot say if it is worth your time, but I definitely use this method for peace of mind when I invest in nice fabric.
Snip into fabric along selvage, and free a single weft thread from the textile.
Pull on weft thread gently (your goal is to remove it from the textile completely or create a noticeable line to follow with scissors).
Once fiber is removed (or textile is disturbed enough to notice a path) you may cut into textiles following the line. You may need to free a weft thread a few times as you go after cutting).
If you lose track of your path hold textile up to the light.
This step is time consuming but definitely rewarding to produce a high quality garment.