As you can see in the above figure, Bayesian optimization works in an iterative framework. In general, at each iteration, given a set observation points, these methods select k>=1 unobserved points from the function to be evaluated. The results of those experiments are then added to the set of observations and the procedure is repeated until some stopping criteria. There are two key components in the basic framework of Bayesian Optimization, posterior model and selection criterion.
The first component is a probabilistic model of the underlying function that is built based on the prior information (i.e., the existing observed experiments). This process is also known as Kriging. Gaussian process(GP) regression has been widely used in the literature of Bayesian optimization for this purpose. For any unobserved point, GP models its function output as a normal random variable, with its mean predicting the expected function output of the point and the variance capturing the uncertainty associated with the prediction.
The second key component of BO is the selection criterion that is used to determine what experiment to select based on the learned model. In existing literature, various selection criteria have been proposed and most of them are a combination of exploring the unexplored input space of the function (i.e., areas of high variance) and exploiting the promising area (i.e., area with large mean). A selection criterion can be either sequential in which only one experiment is asked at each iteration or non-sequential where a batch of experiment are requested at each iteration.
Here is the link to my Gaussian Process implementation with RBF kernel function in Matlab.