To work with Grid we go to Seleniumhq.com and download the Standalone Server 3.0.1.
Place it anywhere in our PC. We will put in in C drive in this example.In our case we put the jar file in a folder named Seleniumstandalone.
We open command prompt and go to location of that file,by typing cd c:\Seleniumstandalone
Then let us make a hub first on our pc.
java -jar selenium-server-standalone-2.48.2.jar -role hub
Then go to our browser and type local:4444 and we will see our hub create there
Then let us make our first node on our pc. For that let us open a new cmd(dont close the previous cmd where hub is running.it is very imp) and go to the same location where our jar file we downloaded is placed and then type
java -jar selenium-server-standalone-2.48.2.jar -role webdriver -hub http://localhost:4444/grid/register -port 5556
This will make our first node at port 5556.
Note-If we want to rub our hun and node on different machines we need to type the ip address of machine on which hub is running instead of localhost
Then we can again go to localhost:4444 and go to console and see that it can run on 5 firefox browsers,5 chrome browsers and 1 IE browser by default