There are plenty of books and resources on the topic; and it's also something which many design schools and universities teach. Lastly you can often hire consultants with prior experience, these are often called "interaction designers", "information architecture specialists", or just "usability experts".
One hands-on book with practical information is "Designing Web Interfaces" by Jenifer Tidwell. It mostly covers patterns for distinct user interface elements, such as a main navigation menus, edit-in-place interactions, main navigation menus on mobile, etc.
Steve Krug has written excellent books in this field. His latest book "Rocket Surgery Made Easy" is a practical and quick introduction to usability testing, i.e. discovering what the problems are. His previous book "Don't make me think" is a classic.
if some one wants to build websites like Amazon, Ebay, etc
IMHO you can't start from scratch and make a proper design for such a complex site. The design needs to be appropriate for the customers, but as a company grows and adds to its products, the customer needs change. Design for the interactions you have now with an eye to what's going to be added in the near future -- not for what your site might look like in 2+ years.