Percolation theory and some applications