There are webpages that contains .sty text file. Does anyone know how to use it?
Thanks for any helpful answers.
I think you need to be more specific. Generally,
in the preamble of your document. In order for this to work the .sty file must be installed in a place where LaTeX can find it. In the simple case where the package needs no support files this could be the directory with your document or in a local texmf tree.
In more complicated cases you need to install all files according to their types. See Where to install packages for details.
However, if you are using one of the big TeX distributions, e.g. MiKTeX or TeXlive, chances are that you can install the package using the distribution package manager. This will ensure that you get an up-to-date version and that the package and support files will be correctly installed.