The general idea is that a weighted average (or mean) is for a variable $x$ and weights $w$ $$\bar x = \sum_i w_i x_i / \sum_i w_i.$$
If additionally or alternatively, weights are defined as adding to $1$, say in this notation $w'_i = w_i/\sum_i w_i$, then it follows that you can write $\bar x = \sum_i w'_i x_i$.
The usual unweighted average fits this pattern too. Consider the average $(1 + 2 + 3)/3,$ which we could write in terms of $w_i = 1/3$
$$[(1/3) 1 + (1/3) 2 + (1/3) 3] / [(1/3) + (1/3) + (1/3)]$$
or in terms of $w_i = 1$
$$[1 \times 1 + 1 \times 2 + 1 \times 3] / [1 + 1 + 1]$$
or indeed using any other positive constant $w_i, 42, 666,$ or whatever else takes our fancy.
The more general weighted average is often used without using that name. Suppose the variable is the number of bedrooms per household and in $100 $ households we observe $1$ bedroom $30$ times, $2$ bedrooms $30$ times and $3$ bedrooms $40$ times. Then the appropriate average uses the frequencies as weights, and is thus $(30 + 60 + 120) / 100 = 2.1.$.
The weights do not have to be integers or even counts or frequencies. Thus one simple moving average (in time series analysis, and in some other contexts) is often presented as $0.25 \times$ previous value $+\ 0.5 \times$ present value $+\ 0.25 \times$ next value. That one was called Hanning by John W. Tukey, after Julius von Hann.
There is no requirement that weights are all positive, just that their sum $\sum w_i$ is positive. For example, negative weights arise naturally for certain moving averages in time series analysis. And zero weights are allowed too in a definition, and just result in values not being included at all. An example would be a moving average using a finite window, where implicitly or explicitly observations not in the window get zero weight.