Reason for inertia of motion of Earth orbiting the Sun We all know the following universal truth since childhood.

Earth (and other planets) orbits around the Sun.

And, while I was reading this post, I found that the reason behind Earth revolution is chiefly due to one force:

* Gravitational pull 
Some physicists explains the movement of Earth around the Sun on the basis of the following image:


As we can see, the initial state of rock is rest. And when we apply a force, it starts moving in a circular path.

Now my question is from where the Earth had got the inertia of motion? As the rock in the above example was initially at rest and so the Earth should also be in state of rest (without any force applied on it).
 A: There is no sideways force.  Without any force at all, the planet would keep moving in a straight line with a constant speed.  You can probably find more information about this by searching for "conservation of momentum."  When the gravitational force that pulls the planet toward the Sun is included, the planet's would-be straight path is bent into a circular orbit.  This gravitational force toward the center of the circle is called the "centripetal force".  
The post you cited depicts this incorrectly, which is especially disappointing because that appears to be a NASA site! In the picture labelled "This activity demonstrates...", the "centripetal force" should point toward the center, not in the direction of motion.  
Here's a different NASA webpage that describes it correctly: https://imagine.gsfc.nasa.gov/features/yba/CygX1_mass/gravity/circular_motion.html.  The caption of one of the pictures on that page says, "Centripetal means center-seeking. Centripetal forces are always directed toward the center of the circular path." [emphasis added]
Note added: While I was typing this post (including looking for a NASA website that gets it right), other answers appeared, and I didn't notice that until after I posted this answer.  I didn't mean to be repetitive.
A: There is no sideways force. It is just the Sun's gravity (shown in that diagram) combined with the fact that the Earth is already moving. This is similar to when you swing a rock tied to string around you in a circle (dangerous!!); the rock's circular movement is due to one force, the force from the string.
A: You are misinterpreting the post and figure. The earth tends to move in a straight line due to inertia (Newton's first law). 
However, earth senses a sideway force due to gravity from the sun. Sideway refers to the force perpendicular to the straight line.
A: The Earth has never been at rest.
The Solar system is thought to have formed from the collapse of a large cloud of gas and dust.  Individual molecules of that cloud probably had relatively small velocities to begin with, but as the cloud collapsed, they accelerated (converting gravitational potential energy into kinetic energy) and conservation of angular momentum forced them into a spinning disk (same phenomenon as an ice skater spinning faster when they pull their arms in).  Collisions built rocks out of molecules and planets out of rocks.  In the process, each planet accumulated (nearly) all the kinetic energy of everything that went into its formation.
The last major change to the Earth's kinetic energy was probably due to the giant impact that formed the Moon.
