In floating ball valve, the ball is held in the position by the compression of the two elastomeric seats against the ball. The ball is free to float inside the valve body. See the highlighted portion in the image and remember as you will see the difference when I will explain you about trunnion mounted ball valve. The stem is connected to a slot at the top of the ball which allows the ball to rotate a quarter turn (90 degrees). The shaft allows for a certain amount of lateral movement of the ball that is generated from the upstream pressure acting on the ball. This small lateral movement, in fact, produces a load on the ball that presses it against the downstream seat which improves leak tightness of valve. This type of ball valve design is, therefore, capable of bi-directional shut-off. Floating ball valve is very difficult to operate when upstream pressure is high. You can see the image of floating ball valve.
Trunnion mounted ball valve is a solution to the problem of excessive torque required by floating ball valve in high-pressure service. A short shaft like an extension that called trunnion set in the body. You can see this in the image. In this design steam and ball work as a single unit. The ball is supported by two floating or spring-loaded seats that remain in constant contact with the ball.
Trunnion ball design required a lower operating torque. Hence, reduces the size of the actuator and overall costs of the valve. This cost difference becomes an important factor when the pressure class and valve size increases.