Take a polygon and choose a line segment between two points on the perimeter that is fully contained inside the polygon.
Separate the polygon along this line segment to produce two polygons. Be sure to distinguish the "exposed cut edge".
Choose one of the two parts and join it to the other so that the exposed cut edge is touching an edge of the other part along its full length. It does not have to be joined to the other exposed edge, as long as it is touching some edge along its full length. You may choose to flip one of the parts before rejoining.
This will produce a polygon with the same area and same perimeter as the original polygon.
rschwieb's answer is an example of this method.
Special case: cut-flip-join-in-same-place
Cut the polygon in two as described above. Flip one part. Join the two exposed cut edges.
Unless the part flipped was symmetric, you will have made a new polygon (as opposed to simply restoring the original polygon). If at least one end of the line segment is not at a vertex, then you will also change the number of sides.
The simplest example is an isosceles triangle and a parallelogram:
However you can start with any triangle and progressively make shapes with more and more sides: