It's hard to answer your question without being given the definitions of "rational" and "integer." In a class like this, definitions are of paramount importance. using the formal definitions, it should be absolutely clear they are not the same.
To add to Cody's explanation, to build to the Rationals, we need some base to start from.
1) A Natural Number is anything in the set {0,1,2,3,...} (or without zero, if you wish).
2) An Integer is the set of Natural Numbers together with their unique additive inverses together with 0 (note here, we must place a structure on the Natural Numbers to form the Integers; by defining addition, we also may define multiplication).
3) A Rational Number is any "legal" quotient of Integers (note again we placed an additional structure, and these inherit all those properties from the Integers--but that should be proved)
Why is it not obvious that 2) and 3) are different? All integers "are" obviously rational, but be careful, "6/3" is not an integer unless you set up the natural equivalence relation: An integer a is equivalent to a rational p/q if and only if a*q=p. Note multiplication here is in the integers.
Here it becomes useful, using the above definition, to think of the Integers as only the rationals a/b that form a set of solutions of the integer equation \(\displaystyle bx=a\) for some integer x.
If you accept this, then if 2/7 was an integer, 7x=2 has a solution in the integers. If you have learned the PMI: Principle of Mathematical Induction, this is an easy exercise. First note that in our assumption x must be positive (why?). Hence x is a natural number, so we may use the PMI to show it is never true.
This is a little unnecessary, as simply showing: "For all positive integers x we have 7x > 2" is enough. This is a 1-liner: Suppose there exists a positive integer n such than 7n <=2. Then 7n < 7 implies 7n-7 < 0 implies n < 1.