for using web3.js it is necessary to install geth into your system or it automatically connect with geth or ethereum blockchain?
var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'))
here we connect something. In this command we are connecting to what? are we connecting to ethereum public chain or something else?