Tsunamis do not occur only at sea. On rare occasions, large flash-flood waves are produced in (Swiss) lakes.
Ocean tsunamis occur when an earthquake suddenly raises or lowers the seabed, possibly accompanied by submarine landslides (if the ocean floor merely shifts horizontally, there is barely any impact on the volume of water above it).
The main causes of lake tsunamis are rock avalanches and sediment slides, which may occur above or below water, but are not necessarily triggered by earthquakes.