Here's an explicit construction of $f$ and $g$ such that neither $f=O(g)$ nor $g=O(f)$. To make the calculations slightly easier, I've chosen $g$ to be increasing and $f$ to be nondecreasing (namely, $f$ will be a step function), but one can follow the technique and tweak $f$ so that it's increasing, as well.
First, let $g(n)=n$. Construct $f$ as follows:
- For $1\le n < 4$, define $f(n)=2$.
- For $4\le n < 36$, define $f(n)=12$.
- For $36\le n < 576$, define $f(n)=144$.
- For $576\le n < 1440$, define $f(n)=2880$.
- In general, for the $i$th interval, $\prod_{k=1}^ik^2\le n < \prod_{k=1}^{i+1}k^2$, define $f(n)=(i+1)\prod_{k=1}^ik^2$.
Now consider the endpoints of these segments in the graph of $f$: At the left endpoint of the $i$th segment, $(x_i,y_i)$, it's not difficult to verify that $f(x_i)=(i+1)x_i=(i+1)g(x_i)$ and similarly at the right endpoint, $(x_{i+1}, y_i)$, we'll have $f(x_i)=(1/(i+1))x_{i+1}$ (well, not quite, since the function jumps there, but the value of the function will be quite close to that value as you approach the right endpoint).
The whole point of this construction is that at $x_i$ you'll have $f$ take a value that is $i+1$ times that of $g$s value, meaning that you won't be able to find a fixed constant $c>0$ such that $f(n)\le cg(n)$ eventually, meaning that $f=O(g)$ isn't satisfied. In simple terms, $f$ eventually gets twice as large as $g$, then three times as large, then four times as large, and so on.
In a similar way, $f$ gets half as large as $g$, then a third as large, then a fourth as large, and so on, meaning that we don't have $g=O(f)$ either.