the key idea is linear combinations. they are a way to, express an infinite number of things usaing only a finite number of basic ones.
e.g. every polynomial of degree 2 or less can be expressed as a sum of multiples of (i.e. as a linear combination of) the absic monomials, 1,X,X^2. Hence the vector space of all polynomials of degree 2 or less has dimesion at most 3 (the number of elements in our set 1,X,X^2).
the set 1,X,X^2 which can be used to express everything contain s a basis. To see if it is itself a basis, you must check whether any polynomial of degree 2 or less can be expressed using these guys, in more than one way.
i.e. suppose a + bX + cX^2 = d + eX + fX^2. Can you be sure that a=d, b=e, and c = f? if so, then there is only one way to use the basic monomials 1,X,X^2 to express any degree 2 polynomial, and so they are a "basis". I.e. they not only "span" everything, but they are also independent, hence a basis.
(My use of the word "basic" earlier was merely informal, and had nothing to do with the technical meaning of "basis".)
the functions 1, cos^2 and sin^2, are not independent, since 1 = cos^2 + sin^2. so there is more than one way to express the function 1 using them.
first master linear combinations, then an unnderstanding of bases will be added unto you.
i.e. given a collection {v1,...vn}, the set V f all things that are linear combinations of these, i.e. all things of form a1v1+...anvn, is the subspace spanned by the set v1,...,vn.
And if each thing in that subspace V has exactly one expression as a linear combination of the set v1,...vn, then that set is a basis of that subspace.
in fact v1,...,vn is a basis of V if and only if no one of the vj can be expressed as a linear combination of the other v's.
so all the concepts you are asking about are defiend in terms of linear combinations.