If your cash flow is on the small side (
A merchant account can be had from most banks; of course, in order to get one, you need to be a registered business, and satisfy several other criteria which differ depending on the bank.
Secondly, you need to choose a payment processor. I would recommend Authorize.net if your customers are US-based. I've worked with them before, and had good success.
Not all banks, and not all payment processors work together, so double check if they will work well together.
Once you have them set up, your payment processor will give you an API allowing you to integrate with their payment services. If you use common ecommerce software, their most likely will be plugins or code existing to integrate with the major payment processors.
Make sure your website is secure - you will be responsible for any leaked customer data.
Good Luck!