Suppose that you have a servlet which can not service client requests unless you initialize it properly. ServletConfig is used for initializing a particular servlet, and holds the servlet specific init-parameters configurable through deployment descriptor. When the servlet instance is created container creates a corresponding ServletConfig object and calls the servlet's init(ServletConfig) method passing the servletConfig object. Which can be used for obtaining the init-parameter information from it.
ServletConfig is one per servlet.
Similarly if you want that all of your servlets have access to same initialization parameters then instead of copying them in all the servletConfigs you can use ServletContext's init-parameters (context-param). ServletContext is one per web-application. so all the servlets share one ServletContext.
Besides it, ServletContext can also be used for sharing Objects by setting attributes.