Optimal solutions for Rubik's Cube refer to solutions that are the shortest. There are two common ways to measure the length of a solution. The first is to count the number of quarter turns. The second is to count the number of outer-layer twists, called "face turns". A move to turn an outer layer two quarter (90°) turns in the same direction would be counted as two moves in the quarter turn metric (QTM), but as one turn in the face metric (FTM, or HTM "Half Turn Metric", or OBTM "Outer Block Turn Metric").
The maximum number of face turns needed to solve any instance of the Rubik's Cube is 20, and the maximum number of quarter turns is 26. These numbers are also the diameters of the corresponding Cayley graphs of the Rubik's Cube group. In STM (slice turn metric) it's unknown.
There are many algorithms to solve scrambled Rubik's Cubes. An algorithm that solves a cube in the minimum number of moves is known as God's algorithm.
Source - https://wikipedia.org/wiki/Optimal_solutions_for_Rubik's_Cube