\newcommand{\mr}{\mathrm} \newcommand{\ff}{fragmentation function} \newcommand{\ffs}{fragmentation functions} \newcommand{\ee}{e$^+$e$^-$} \newcommand{\Qj}{$Q_{\mr jet}$} \newcommand{\xe}{$x_{\mr E}$} \newcommand {\egstar} { E_{\mathrm g}^* } Fragmentation functions of quark and gluon jets as measured by OPAL. Scaling violations of quark and gluon jet \ffs\ are studied in \ee\ annihilations at $\sqrt s =$ 91.2 and 183--209~GeV using data collected with the OPAL detector at LEP. The scale dependence of the flavour inclusive, udsc and b \ffs\ from unbiased jets is measured at $\sqrt s/2=$ 45.6 and 91.5--104.5~GeV. Biased jets are used to extract the flavour inclusive, udsc and b, and gluon \ffs\ in the ranges $Q_{\mr jet}=$ 4--42, 4--105 and 4--70~GeV, respectively, where \Qj\ is the jet energy scale. Three methods are used to extract the \ffs, namely the b-tag and energy-ordering methods for biased jets, and the hemisphere method for unbiased jets. The results obtained using these methods are found to be consistent with each other. The udsc jet results above the scale of 45.6~GeV, the gluon jet results above 30~GeV (except for the scale of 40.1~GeV), and the b jet results at all scales except 45.6~GeV represent new measurements. The results of this analysis are compared with existing lower energy \ee\ data and with previous results from DELPHI and OPAL. The overall consistency of the biased jet results with the unbiased jet results suggests that \Qj\ is a generally appropriate scale in events with a general three-jet topology. The scaling violation is observed to be positive for lower \xe\ and negative for higher \xe, for all the types of \ffs. The gluon jet \ff\ exhibits stronger scaling violation than that of udsc jets.\\ The bias of the procedure used to construct biased jet \ffs\ is estimated by studying hadron level Monte Carlo generator events. In explaining the observed differences between biased and unbiased jet results, we note the effects of non-negligible masses of hadrons and b-quarks at low scales. Due to the considerable bias found for the gluon jet \ffs\ in the region of $x_{\mr E} > 0.6$, precautions should be taken when comparing the biased gluon jet results with theory.\\ The data are compared to the predictions of NLO calculations. In a wide range of \xe, all calculations satisfactorily describe the data for the udsc jet \ffs. The description is worse and the spread between the predictions larger for the b and gluon jet \ffs, in particular in regions of very low and high \xe. \\ The data are also compared with predictions of three Monte Carlo models, PYTHIA 6.125, HERWIG 6.2 and ARIADNE 4.08. A reasonable agreement with data is observed for all models, except for high \xe\ region with small scales ($\lesssim$ 14~GeV) in case of the udsc and gluon jet \ffs.\\ The charged particle multiplicities of udsc, b and inclusive hadronic events are obtained by integrating the measured \ffs. All values are found to be in agreement with previous measurements, where available.\\ The first experimental study to use the jet boost algorithm, a method based on the QCD dipole model to extract properties of unbiased gluon jets from {\ee}$\,\rightarrow\,$$\mathrm q\overline{q}g$ events, has also been presented. We test the jet boost algorithm using the Herwig Monte Carlo QCD simulation program, comparing the results of this method to those derived from unbiased gluon jets defined by hemispheres of inclusive gg events from a color singlet point source. We find that the results of the jet boost algorithm for the multiplicity distribution are in close correspondence to those of the gg hemispheres for jet energies $\egstar$ larger than about 5~GeV. For the fragmentation functions, the results of the two methods agree to good precision for $\egstar$$\,\gtsim\,$14~GeV. Therefore, the fragmentation function of unbiased gluon jets have been measured only at two points, namely at 14.24 and 17.72~GeV.