Copying a portfolio

How do I earn in the stock market by copying a portfolio?