How to manipulate stock price

What are the methods used to manipulate stock prices and are they legal?