Take any two continuous functions $f$ and $g$ from $\mathbb R$ to $\mathbb R$, such that $f(x) - g(x) > \epsilon > 0$ for all $x \in \mathbb R$, and define
$$h(x) = \begin{cases}
f(x) & \text{if } x \in \mathbb Q, \\
g(x) & \text{if } x \in \mathbb R \setminus \mathbb Q.
\end{cases}$$
Then, if I understand the definition correctly, $h$ will be upper semicontinuous at all rational points and lower semicontinuous at all irrational points, while being neither left nor right continuous anywhere. Or course, the same construction works equally well with any partition of $\mathbb R$ into dense subsets.
However, reading between the lines, I guess what you really want is an example of a function which
is (WLOG) upper semicontinuous everywhere,
is neither left nor right continuous as some point $x_0$, and
does not have a local extremum at $x_0$. The second Wikipedia example (involving a two-sided topologist's sine curve) almost works, though, and we can easily tweak it a bit to get
$$f(x) = \begin{cases}
(x^2+1) \sin (1/x) & \text{if } x \ne 0, \\ 1 & \text{if } x = 0.
\end{cases}$$
This function should satisfy the requirements given above for $x_0 = 0$.
What you want is use the $\varepsilon$-$\delta$ definition of continuity/semi-continuity
$$
\forall \varepsilon > 0, \quad \exists \delta > 0 \quad \text{s.t.} \quad |x-x_0| < \delta \quad \Longleftrightarrow \quad |f(x) - f(x_0)| < \varepsilon.
$$
Since $|f(x) - f(x_0)| < \varepsilon$ is equivalent to $f(x_0) - \varepsilon < f(x) < f(x_0) + \varepsilon$, this statement is equivalent to
$$
\forall \varepsilon > 0, \quad \exists \delta > 0 \quad \text{s.t.} \quad |x-x_0| < \delta \quad \Longleftrightarrow \quad f(x_0) - \varepsilon < f(x) < f(x_0) + \varepsilon
$$
which means continuity is equivalent to upper and lower semi-continuity.
ADDED : I'll assume the definition of semi-continuity is the following, i.e. that the preimage of an open set of the form $\{ y \, | \, y > a \}$ is open for any upper semi-continuous function, and that the preimage of an open set of the form $\{ y \, | \, y < a \}$ is open for any lower semi-continuous function. If this is not the definition you have, let me know. I'm just guessing those definitions from the $\varepsilon$-$\delta$ definitions of continuity.
We show that continuity $\Longleftrightarrow$ upper and lower semi-continuity.
$(\Longrightarrow)$ This one is clear, since if the pre-image of any open set is open, then in particular are the pre-images of those of the form $(a, \infty)$ and $(-\infty,a)$.
$(\Longleftarrow)$ If $f^{-1}((a,\infty))$ and $f^{-1}((-\infty,b))$ are open sets, then since $f^{-1}((a,b)) = f^{-1}((a,\infty)) \cap f^{-1}((-\infty,b))$ and that the intersection of two open sets is open, then $f^{-1}((a,b))$ is open. Now any open set $\mathcal O$ in $\mathbb R$ is of the form
$$
\bigcup_{n=0}^{\infty} (a_n, b_n)
$$
where all the intervals $(a_n,b_n)$ are pairwise disjoint and $a_n \in \mathbb R \cup \{-\infty\}$, $b_n \in \mathbb R \cup \{\infty\}$. But
$$
f^{-1} \left( \bigcup_{i \in I} \mathcal O_i\right) = \bigcup_{i \in I} f^{-1} (\mathcal O_i)
$$
for any collection of sets indexed by any set $I$ (prove this trivially by the definition of pre-images and show $\subseteq$/$\supseteq$), thus,
$$
f^{-1}(\mathcal O) = \bigcup_{n=0}^{\infty} f^{-1}((a_n,b_n))
$$
which is an open set.
Hope that helps,
Best Answer
A function is continuous if the preimage of every open set is an open set. (This is the definition in topology and is the "right" definition in some sense.) The definitions you cite of semicontinuities claim that the preimages of certain open sets are open, but does not say so about all open sets.
Note that $\{ \{f \in \mathbb{R} \mid f > \alpha\} \mid \alpha \in \mathbb{R} \} \cup \{ \{f \in \mathbb{R} \mid f < \beta\} \mid \beta \in \mathbb{R} \} $ is a (topological) basis for $\mathbb{R}$. (Finite intersections of such sets generate all the intervals $(a,b) \subset \mathbb{R}$, which is also a basis, although perhaps more recognizably so.) Consequently, a function that is both upper and lower semicontinuous has the property that the preimages of intervals are the intersections of two open preimages (an upper preimage and a lower preimage), so are open. Thus, being both upper and lower semicontinuous means being continuous. (Some minor details are elided in this argument, but are not essential.)
As @Martín-BlasPérezPinilla observes, this has nothing to do with continuity from the right or left. If you wish to discuss those ideas, you should look up cadlag and caglad.
One way to intuit upper and lower semicontinuity is to imagine dipping the graph of the function in paint. If you dip it so that the lower parts of the function are wetted, then you get the parts where $f(x) < \alpha$ where $\alpha$ is the level up to which you dipped the function. If you dip it so that only the upper parts of the function are wetted (perhaps by standing on your head), then you get the parts where $f(x) > \alpha$. To be upper semicontinuous, the definition you cite requires that all possible lower wetted subsets of the graph of the function project onto open subsets of the domain. This can be difficult if a connected component of the graph descends (to the right) to a closed endpoint that is below the function to the right of it -- dipping such a function in the paint only enough to include a (half-) neighborhood of the closed endpoint will end up with a little painted segment that may be open on one end and closed on the end of the closed endpoint. Such a function would not be upper semicontinuous. (Note that if the values of the function to the right were below (or at the same height as) the closed endpoint, then they would necessarily be painted any time the endpoint is, so the described scenario need not turn out the same.)