I am working on making a program to solve the rubik's cube. I want to know how and which programming language should I learn so I could interact with real motors which will be used to turn the cube's sides according to algorithm.
Solving a Rubiks cube would require you to have a camera set up, and some video processing going on; it's a dive straight into one of the hardest software topics. If you've never worked with physical devices from software before, you should start with something a bit simpler than a Rubiks cube solver.
Normally you get the motors and microcontroller first, and use the language that the microcontroller supports. Have a look at Arduino projects on Google, they have a whole range from beginner to expert, including Rubiks cube solvers.