You should certainly have a good CV. However, the first and probably most important step is contacting a professor at the university you want to go to, and then submitting to him/her a research proposal.
In some very good universities you must not contact a professor beforehand but you should submit a research proposal, anyway.