Polygons are similar if the sides have the same ratio in the first as they do in the second one. The easiest way to check for this is to compare the angles. If they have the same angles, AND if they are the same shape, then they should be similar.
Squares CANNOT be similar to rectangles, because the ratio of the side lengths is different even though the angles are all 90 degrees.