Each specific sequence of polypeptide yields only single, compact, biologically active fold in native state. This fold generally has many sub-states with minor structural differences between them, but all of these sub-states have the same general fold.
In other words, under physiological conditions there appears to be one conformation for a given amino acid sequence that has a significantly lower free energy than any other. So, one can search all possible conformation in random fashion until we get lower energy conformation of native state.
But this seems to be impossible : Each peptide group has 3 possible conformation (i.e. allowed regions of α ,β, L) in Ramachandran diagram. A polypeptide of 150 residues will have 3130 approx. 1068 conformation to search. It will take about 1044 years. But actual folding time is between 0.1 to 1000 sec. in vivo or in vitro. To occur on this short time scale, the folding process must be directed in some way through a kinetic pathway of unstable intermediates to escape sampling a large number of irrelevant conformations.
A force field equation is used for prediction of structure. This force field includes all the physical forces that drive proteins into native conformation.
To find the energy minimum of a protein different softwares are used the use molecular dynamics. When we reach nearest local minimum this algorithm or mathematical routine gets trapped in the local minimum. Global minimum is the local minimum with lowest energy. To escape local minimum there are algorithm like metropolis monte carlo, simulated annealing. We have to repeat this process until global minimum is found. We don't really know how many times we have to repeat this process and there is nothing to distinguish the global minimum with local minimum except global minimum has lowest energy than all other local minimum. This whole problem is called multiple minima problem.