A rectangle is a quadrilateral with all four angles right angles. It follows form this that the opposite sides are parallel and of the same length.
A square is a quadrilateral with all four angles right angles and all four sides of the same length. Thus a square is a special kind of rectangle, it is one where all the sides are the same length.
They are different in terms of the diagonal as well, the diagonals of the square are perpendicular to each other.
Thus every square is a rectangle because it is a quadrilateral with all four angles right angles. However not every rectangle is a square, to be a square its sides must have the same length.