If the earth has gravity, why don't we all collapse to the center? I'm sorry if the answer is obvious for you guys, but why don't we all (including buildings, road, people, the ground) collapse to the center of the earth because of gravity? Is it because we have velocity, just like the earth not falling to the sun (or electrons not falling to the protons)? But that analogy doesn't sound right because those involve wide empty space.
 A: While there is some truth to all the answers presented, I think there is something important that has been missed. 
It is not just electromagnetism, it really is a quantum mechanical effect.  The Pauli exclusion principle for the spin-$\frac{1}{2}$ electrons says that two electrons with the same spin state cannot occupy the quantum orbital state.  So when two atoms are pushed together by, for example, gravity, is therefore essentially a quantum mechanical effect that prevents the electrons from occupying the same space that results in a distortion of the quantum mechanical wavefunction.  The energy it takes to create this distortion is what then results in the electromagnetic repulsion.
As @Vineet and others say, there are only 4 forces in nature and only gravity and electromagnetism have a long range.  So it has to be the stronger electromagnetic force that opposes gravity, but it is the quantum mechanical Pauli exclusion principle that causes the distortion of the wavefunction that results in the electromagnetic force.
A: Well, if you run over a sufficiently deep hole, you WILL fall to center. So why don't you fall to the center anyway? Because there already is something thats blocks the space - namely "the earth". As most of it is either heavier than you are (so switching places would need energy to lift the it up) or at least is solid and sticks together, it's on you to stay on the outside of the ball. If the matter below you is light and doesn't "stick together" tough, you will fall as deep as possible to the center (i.e., until you hit something that again is solid and/or heavier than you are). In case of a hole this lighter material is air, in case of, for example, the ocean it is water. In both cases you "fall" to the ground, that is, towards the center of the earth.
So why does matter block us at all, why can't we go through walls or fall THROUGH the ground to the center of the earth? The answer is: elektromagnetic forces between the atoms of the matter. They prevent the atoms from colliding.
A: A simple framework of the fundamental forces suggests the following explanation
The second of your guesses is the correct one.  The reason we do not fall to the center of the Earth is the same reason you don't fall to the floor when you sit down in a chair; the electrons in your body repel the electrons in the chair.
More specifically, there is an electron cloud around each atomic nucleus.  When two atoms get close to each other, the repulsion between their respective clouds keeps them apart.  Meanwhile, the attraction between the cloud and the nucleus keeps each individual atom together.
From this view, the explanation superficially makes sense.
However...
As pointed out in the comments below, this explanation is not the one given by modern quantum theory.  According to quantum mechanics, particles with half-integer spins follow the Pauli exclusion principle and cannot occupy the same quantum states simultaneously.  Because electrons, protons, and neutrons are all fermions, they are excluded from occupying the same states and it is this that prevents you from falling through the chair.  To figure out why the Pauli exclusion principle holds, it is necessary to get deeply into quantum mechanics and solid state physics.  I am not an expert in either so I'll leave that up to those more capable than myself.
It should be noted that the correction to my original answer is not a trivial one.  It isn't just the framework of the two views that changes, the predictions made by them also change.  A fantastic example of the difference can be seen in superconductivity.  In this phenomenon, electrons join together to form Cooper pairs.  These pairs of fermions are bosons and so do not obey the exclusion principle.  As a consequence, they can travel through superconducting material (made up of electrons and protons) without resistance despite the Coulombic attraction and repulsion. 
A: Because the electromagnetic force, the force that keeps atoms together is much much much much more stronger then the gravitational force. So the only thing that the gravitational force can do given the mass of the earth (G = mg) is bring the atoms closer, but as we go down to the atom, the electromagnetic force overcomes the gravitational force and keeps everything as it is
A: To add to the previous answers, note that the universe has four major forces.  Of these, gravity and electromagnetism dominate the macroscopic level. Between these two forces, electromagnetic forces are orders of magnitude stronger than gravitational forces, mainly because of the small value of the Gravitational constant $G$. So, when you sit on a chair, there are two forces playing tug of war, the gravitational force of the earth pulling you towards center, and the electromagnetic forces between the electrons in you and the chair which keeps you apart (one is attractive and other is repulsive).
A: I think the electromagnetic force plays an important rule,which prevent you falling into the centre of earth..
A: Gravity is acting upon every object on the earth, and it is pulling everything towards its center. But everything does not collapse to its center because the surface on which the object stands provides the reaction force upward (away from the center) and balances the weight of the object. If it can't balance the weight of the object, then certainly the object sinks towards the center of the earth due to the force of gravity. In our case and the case of building the surface provides the reaction force upward balancing our weight and that of the heavy buildings. So, nothing collapses but just continue to rotate along with earth due to the inertia. 
