TeX's first step is to parse the current/working folder for files that are needed. This covers everything from .tex, .sty, .cls, image files, and everything else. If this fails, TeX searches the index made when you run texhash. This index contains the folder and file locations of your TeX distribution in the form of an elementary "hash table" that is used as a lookup. Actually, it's just an alphabetical list of files by folder. Since TeX can be installed wherever you want to, such an accessible table is necessary to identify the locations of the sources. Under TeX Live, this file (ls-R, named based on a Recursive folder listing) is located in your */texmf-dist folder and has the following form:
...
./tex/latex/bhcexam:
BHCexam.cfg
BHCexam.cls
./tex/latex/bibarts:
bibarts.sty
./tex/latex/biblatex:
bbx
biblatex.cfg
biblatex.def
biblatex.sty
biblatex1.sty
biblatex2.sty
blx-compat.def
blx-dm.def
blx-mcite.def
blx-natbib.def
cbx
lbx
...
You can see how this matches the folder structure:

Only the above two locations are searched, in that order, when looking for files.
Note that, even if you place source files inside the TDS (TeX Distribution Structure), it won't be picked up automatically unless you run texhash. ls-R has to be updated to include your newly-placed files, otherwise the files won't be found.
Another reference: Where do I place my own .sty files, to make them available to all my .tex files?
texhashafter installing the file? – Joseph Wright Nov 28 '13 at 08:01/usr/local/share/texmf/tex/latex/, runsudo texhash, worked like a charm. Here is the relevant line from log file,/usr/local/share/texmf/tex/latex/ectaart/ectaart.cls. Though it did complain about,Unused global option(s): [english]. I am using Ubuntu 12.04, BTW. – Masroor Nov 28 '13 at 09:39texmfis,~/texmf; but as this is a LaTeX file, you need to put it in the right subdirectory, sc.:~/texmf/tex/latex. If you like well-designed directory hierarchies, you could do:mkdir ~/texmf/tex/latex/ectaartand put it there. Note thattexmffolder must mimic the system TDS, so a corresponding.bibfile would be put in,~/texmf/bibtex/biband the.bstin~/texmf/bibtex/bst. There are a bunch of questions on this site that answer this general question of 'where' more fully. – jon Nov 28 '13 at 15:04