The dual nature of a Bayesian network makes learning a Bayesian
network as a two stage process a natural division: first learn a
network structure, then learn the probability tables.

There are various approaches to structure learning and in Weka, the
following areas are distinguished:

local score metrics:
Learning a network structure can be considered an optimization
problem where a quality measure of a network structure given the
training data needs to be maximized. The quality measure
can be based on a Bayesian approach, minimum description length,
information and other criteria. Those metrics have the practical property
that the score of the whole network can be decomposed as the sum
(or product) of the score of the individual nodes. This allows for
local scoring and thus local search methods.

conditional independence tests:
These methods mainly stem from the goal of uncovering causal structure.
The assumption is that there is a network structure that exactly represents
the independencies in the distribution that generated the data. Then it
follows that if a (conditional) independency can be identified in the data
between two variables that there is no arrow between those two
variables. Once locations of edges are identified, the direction of the edges
is assigned such that conditional independencies in the data are properly
represented.

global score metrics:
A natural way to measure how well a Bayesian network performs on a
given data set is to predict its future performance by estimating
expected utilities, such as classification accuracy. Cross-validation
provides an out of sample evaluation method to facilitate this by
repeatedly splitting the data in training and validation sets. A
Bayesian network structure can be evaluated by estimating the
network's parameters from the training set and the resulting Bayesian
network's performance determined against the validation set. The
average performance of the Bayesian network over the validation sets
provides a metric for the quality of the network.

Cross-validation differs from local scoring metrics in that the quality
of a network structure often cannot be decomposed in the scores of the
individual nodes. So, the whole network needs to be considered in order
to determine the score.

fixed structure:
Finally, there are a few methods so that a structure can be fixed, for
example, by reading it from an XML BIF file3.

For each of these areas, different search algorithms are implemented in
Weka, such as hill climbing, simulated annealing and tabu search.

Once a good network structure is identified, the conditional probability
tables for each of the variables can be estimated.

You can select a Bayes net classifier by clicking the classifier 'Choose' button in
the Weka explorer, experimenter or knowledge flow and find BayesNet
under the weka.classifiers.bayes package (see below).

The Bayes net classifier has the following options:

The BIFFile option can be used to specify a Bayes network stored in
file in BIF format. When the toString() method is called after learning the
Bayes network, extra statistics (like extra and missing arcs) are printed
comparing the network learned with the one on file.

The searchAlgorithm option can be used to select a structure learning
algorithm and specify its options.

The estimator option can be used to select the method for estimating the
conditional probability distributions (Section 6).

When setting the useADTree option to true, counts are calculated using the
ADTree algorithm of Moore [10]. Since I have not noticed a lot of
improvement for small data sets, it is set off by default.
Note that this ADTree algorithm is different from the ADTree classifier algorithm
from weka.classifiers.tree.ADTree.