Yes, you can withdraw a journal submission at any point before it is accepted. Some journals with online submission systems have an option where you can withdraw the paper, but -- curiously? -- not all. Within the last two years I had to withdraw a submitted paper -- there was a mistake! -- and I believe I ended up leaving an "I withdraw this paper" note in the journal's submission system. It took them about a week to get back to me and corroborate that the paper had been withdrawn. (In case anyone cares: our mistake was to use a false result in the literature; we fixed it, resubmitted to the same journal, and the paper was published there, all within six months!) In fact though it doesn't really matter if they respond to your withdrawal in a timely manner or not: if they never respond to you again about the paper then that is exactly the same as if it is withdrawn, and if they do later you can show them your earlier correspondence that you withdrew the paper.
I do want to mention that it is best to be a bit patient and more than a bit persistent when trying to publish one's work. For instance, I believe I currently have two papers that have been under review for over six months. I wish they went faster, but I honestly don't (yet) feel that anything is seriously amiss. Of course this depends a lot on your academic field -- in mine (mathematics), it really does take a long time to referee papers, especially if you include the traditional "1-5 months on the referee's shelf". It is really not acceptable for a reputable publisher to totally ignore your messages. So if I were you I would proceed under the assumption that they don't mean to do that and the wires are somehow crossed. I would send multiple emails to editors in charge, spaced out a week or two apart, to several email addresses. You don't want to jettison a process with a solid chance of reaching the desirable conclusion for one more spin of the big wheel of journal submission.