Generating random mazes with the Growing Tree algorithm (w/ Javascript demo)
weblog.jamisbuck.org
weblog.jamisbuck.org
Note that these mazes are trivially solvable; you can get from any point A to any other point B by hugging the left wall. Somewhat counterintuitively, knocking down a few walls here and there will make the maze harder to solve - especially if you have a limited view of it (e.g. 1st person).
Computers will use an algorithm or combination of algorithms. But which algorithm is best to solve the maze depends entirely on the algorithm used to generate the maze.