The rapid evolution of antibody molecules during an immune response enables the immune system to respond efficiently to an immense variety of challenges. To investigate this response, a theory for molecular evolution in biological systems is developed and analyzed. A molecule can be represented as a sequence of N letters, with each letter being chosen from an alphabet of size a; for protein molecules the alphabet consists of the twenty amino acids, while for nucleic acids it consists of the four base pairs. Together, these a(N) possibilities form a sequence space S. It is assumed that a fitness can be assigned to each sequence in S; for the immune response the fitness is just the chemical affinity of the antibody for the immunizing antigen. Evolution is assumed to occur by random point mutations that change a single letter in the sequence, this defines the set of one-mutant neighbors of a sequence. It is assumed that the original sequence will be replaced by the one-mutant neighbor if and only if the mutant has a higher fitness than the original. Thus, molecular evolution is modeled as being a strictly uphill walk on a fitness landscape, with the landscape being determined by the function that assigns a fitness to each sequence in S. Here evolution is studied on a completely random fitness landscape; evolution on other landscapes is considered elsewhere. It is shown that the fitness landscape is characterized by a large number of local optima, and that evolutionary walks can be expected to become trapped fairly quickly at local optima, rather than at the global optimum. Various statistics of the trapping process are computed, such as the probability of being trapped on the kth mutational step, and the mean and variance of the number of steps to a local optimum. It is also shown that, on average, the local optimum obtained at the end of an evolutionary walk is closer to the global optimum than a randomly selected local optimum, thus establishing that the evolutionary process is more efficient than random search. Because not all mutations improve fitness, various statistics are examined that characterize the total number of mutations and the number of different mutations attempted during the evolutionary process. Finally, the theory is applied to somatic mutation during an immune response.