Rubik's Cube (a mechanical puzzle aslo called the "Magic Cube") has always been a favourite for puzzle solvers, infact around the world many speedcubing competitions have been held to determine who can solve the Rubik's Cube in the shortest time. To solve a Rubik's Cube puzzle many sequences of moves are written and shared, its called the 'algorithm'. It is a very efficient layer-by-layer method that requires a large number of algorithms, especially for orienting and permuting the layers of the cube. The algorithm database on alglist.ning.com is an extensive directory of moves, that can help you in learning, practicing and inventing new algorithms. Using the " F2U'R'LF2RL'U'F2 " sequence of move is the very common one.. Check out the animated version of this sequence.
Going a step further in solving the Rubik's puzzle Daniele Benedettelli has made a LEGO robot that can solve the Rubik’s Cube automatically. A motor actuates a prismatic joint that pushes the side of the cube; another rotates the cube’s support; the third one has the double function to help the pusher arm to accomodate the cube on the support and to hold the cube while the bottom face is rotated. The robot uses 2 touch sensors as limit switches for the arms and a light sensor to zero the rotating base.
Here is the video of the robot in action.
For more info on this methodology click here