I am very new to photography and am trying to grasp the basics of it these days. Can someone please help me understand the relationship between focal length of a lens and shutter speed of camera?
There is no direct relation between the two. However, there is an observation that with longer focal length you need faster shutter (keeping ISO the same) in order to avoid blur from camera shake. Quoting:
The rule of thumb for a sharp picture, free from the effects of camera shake, is to use a shutter speed which is at least as fast as 1 divided by the focal length of the lens. So if you are using your zoom set at 100mm you should use a shutter speed of at least 1/100 of a second. If you are using a 50mm lens you will get a sharp picture at 1/50th of a second.
Now this rule is modified by VR (vibration reduction), and similar solutions, so you gain a few stops so your shutter speed can be decreased by that.
This rule does not apply if the camera is on a tripod, or you have a steady hand, etc.
It also does not help removing blur from people moving, etc.
There is no direct relationship between focal length and shutter speed. Focal length determines your ultimate subject magnification and field of view. Shutter speed is a facet of exposure, which is not explicitly affected by focal length in any way.
Classically, the "rule of thumb" for motion-freezing shutter speed has been 1/focalLength. In this case, a 100mm lens would in turn require a 1/100th second shutter speed to be motion-freezing, a 400mm lens would require 1/400th, a 14mm lens would require 1/14th. This was a commonly used rule in the film days, especially the older film days, where output size was often relatively small, even "contact printed" or minimally enlarged.
With modern equipment, this rule does not necessarily hold up. As pixel sizes shrink, it is becoming more likely that a 1/(focalLength * cropFactor) rule, if not even 1/(focalLength * Constant) where Constant is 2 or greater, is more effective assuming 100% viewing of your images. Blur from camera shake due to unstable hands is rapidly increasing at a rate faster than pixel sizes shrink. Modern lenses often include image stabilization or vibration reduction, and some camera bodies have stabilized sensors. These technologies counter-act the increased effects of camera shake, often by many stops. Full Frame sensors are less prone to camera shake, however their pixels are now starting to approach the size of APS-C pixels from the prior generation, so they will not remain "immune" for long.
There may be an indirect relationship due to the maximum aperture of the lens, which is sometimes dictated by focal length. For wider lenses, especially lenses shorter than 50mm, you might find that the maximum aperture is as fast as f/1.2 or even faster. For longer lenses, especially cheaper longer lenses, you might find that the maximum aperture is f/3.5, and for supertelephoto lenses, the maximum aperture may be f/4 or even f/5.6. This limitation on maximum aperture will often implicitly affect your shutter speed, forcing longer exposures at the same ISO.
More often than not, however, smaller maximum aperture will force you to use a higher ISO setting to achieve the necessary shutter speed, especially if stopping action is your goal.
This is simple. There is none. With rare exceptions, these are independent components. The lens defines its focal-length by its physical properties and the camera defines its shutter-speed range which is a property of the shutter which could be mechanical, electrical or hybrid.
The only exception is when the shutter is located inside the lens. This is called a leaf shutter and is used in medium format cameras mostly as well as a few compact models. For those, the maximum shutter-speed varies according to the aperture because a leaf shutter has to travel more to cover a larger aperture.
They are independent. Focal length affects the angle of view, and shutter speed is one of several factors which affect the exposure. (The other two are aperture and ISO.)
The only case where they may have an interaction is with some zoom lenses which have narrower apertures at longer focal lengths, which in turn may require a longer shutter speed for the same exposure. (You could also increase ISO and leave the shutter speed the same.)
A narrower or wider focal length will change the amount of the scene captured in the frame, and this may also change shutter speed because areas of different brightness are included in different framings. That's an effect of the framing, though, not really the focal length per se.
A narrower framing (longer focal length) also might mean that you need a higher shutter speed in order to reduce camera shake blur. See this question for details on the general rule for that, which is 1-over-focal-length (that is, your lens's focal length in fractions of a second, so a minimum speed of ¹⁄₁₀₀th for a 100mm lens).