A common cause for this problem is that the parent element of the menu (usually a div) is not wide enough. The HTML code (simplified) may look like this:
<div>
<ul class="mainlevel">
<li>Menu Item 1</li>
<li>Menu Item 2</li>
<li>Menu Item 3</li>
</ul>
</div>
To make it appear horizontal the CSS usually makes each li element to "float left". That means the first menu item will start at the left border (of the parent) and each subsequent menu item will be positioned right next to the previous menu item on the same line - if there is enough space, it will be positioned on the next line otherwise.
If the above div element is either very small or set to use as little as possible space then the menu items will not positioned in one line anymore and appear vertical.