Tension rods are actually two different sized tubes (one slightly smaller than the other) with rubber caps on one end. The uncapped end will eventually slide within the capped end.
A high-tension spring made of steel (or occasionally aluminum) is affixed to the uncapped end of the smaller rod and placed inside the larger rod where it is affixed to the capped end.
The smaller rod is then pushed into the larger rod, causing the spring to compress. The larger rod is then either fitted with a special gasket or crimped slightly on its uncapped end to prevent the smaller rod from leaving the inside of the larger rod completely.
Because the spring is compressed, it pushed out against the capped end of the larger rod and the uncapped end of the smaller rod, creating "tension" that transfers that pushing energy into the walls of the shower.