Github inner workings

I just wanna know how github stores all their codes?
Also how do they search on their codes?