In terms of energy, how does chemiosmosis drive ATP synthase? How does electrical energy turn into mechanical energy and then into chemical energy? Would the movement of $H^+$ be considered passive diffusion or secondary active transport?
ATP synthase is basically a pump operating in reverse: while transporters such as the Na/K ATPase uses ATP to push ions against a chemical gradient (resulting in potential energy), ATP synthase uses the H+ gradient across the mitochondrial membrane to make new ATP.
A pump uses ATP (chemical energy) to achieve one-way transport by inducing conformation changes in the protein (mechanical energy), which either opens the channel only when ions come in contact with the low-concentration side, or closes the channel when ions come in contact with the high-concentraton side. In either case, the result is that ions can pass only in one direction, and a concentration gradient will build up (potenial energy).
In the case of ATP synthase, the process is simply reversed: an H+ ion entering the channel from the high-concentration side (the intermembrane space) causes a conformation change that opens the channel, and is coupled to the synthesis of ATP. Precisely how the ATP synthase accomplishes this on the molecular level is a complicated topic, and still an active area of research. See this article for an overview.
Note that ATP synthase is clearly reversible: if the mitochondrial H+ gradient collapses, for example if respiration is blocked, then ATP synthase can run in reverse, consuming ATP to pump H+ out of the matrix. There is even an ATPase inhibiting protein dedicated to blocking the ATP synthase in this situation, to prevent the depletion of ATP. Also, the lysosomal ATPase is structurally similar, but operates in the reverse direction to create low pH in lysosomes.
ATP synthase is a wonderful protein. I'll try to answer to your question without going into too much detail.
The protein complexes of the respiratory chain actively pump H+ to form a proton gradient between the two side of the membrane. ATP synthase uses the movement of the protons down their electrochemical gradient to synthesizes ATP molecules. The transmembrane domain of the ATP synthase (FO) is a passive proton channel. Flow of protons causes the rotation of FO. Rotation of FO causes the rotation of the gamma subunit that connects FO with the catalytic domain of the ATP synthase (F1). Rotation of the gamma subunit causes the rotation of F1 that causes the synthesize of ATP. So the mechanical energy is transferred from FO to F1 via the gamma subunit. In F1 the mechanical energy is transformed into chemical energy via the synthesize of ATP.