To truely understand materials, picking up a beginner's sewing book from the library is recommended, they will almost always include a section dedicated to every type of fabric used within the industry.
Denim is the material jeans are made of. It is a robust cotton cloth. Generally, denim is 100% cotton, variants using elastacine will usually make the denim stretchy so that a generic skin tight fit is easier to accomplish.
Knits aren't so much about the material but moreso about how the fabric is made. Instead of being weaved together, the fabric is woven together. The result is that the garmet has an elastic property without it needing elastacine. Garments that fall under the knitted catagory are usually made out of wool or cotton. Be careful when buying woolen garments as they require extra care when washing.