I downloaded the MacTeX and I am now using Texmaker to finish my algorithm homework.
Not every TeX Live package, package, includes a
.sty file by the same name,
package.sty. Sometimes it does. Sometimes it doesn't. To figure out what a package provides, read its documentation or look inside its directories. Alternatively, in some cases, you can simply ask TeX Live Manager. For example,
tlmgr info algorithms
package: algorithms category: Package shortdesc: A suite of tools for typesetting algorithms in pseudo-code longdesc: Consists of two environments: algorithm and algorithmic. The algorithm package defines a floating algorithm environment designed to work with the algorithmic style. Within an algorithmic environment a number of commands for typesetting popular algorithmic constructs are available. installed: Yes revision: 38085 sizes: src: 53k, doc: 365k, run: 17k relocatable: No cat-version: 0.1 cat-date: 2015-08-03 05:43:12 +0200 cat-license: lgpl cat-topics: pseudocode cat-related: alg collection: collection-science
So the package probably provides
algorithm.sty, at least.
ls $(kpsewhich -var TEXMFMAIN)/tex/latex/algorithms/