You need to have a membership. You have to show your card to enter the store and hand it to the cashier before they start ringing up your items. Memberships are around $50 per year, although there are several levels that give you more perks and cost more.
A tip- you can get some Kirkland (Costco brand) products on Amazon for the same price without a Costco membership. We found we were going to Costco mostly for DH's over-the-counter allergy meds, then buying a bunch of stuff we didn't need. We let our membership lapse and now get the meds from Amazon. It saves us money!
Re: the bolded. I always used to get the regular membership. One day while I was in Costco checking out, a guy came up and scanned my card and told me that based on the amount I purchased in a year, if I upgraded to an Executive Membership, I would end up getting it free. The Executive Membership costs more, but once a year they give you rebate based on the amount you have purchased within the store. That rebate is always enough to cover the cost of my membership.

When is Costco changing to visa? We were going to join last year but you needed an AE and we don't like AE. We will join when they start accepting visa since that's our Disney card.
When is Costco changing to visa? We were going to join last year but you needed an AE and we don't like AE. We will join when they start accepting visa since that's our Disney card.
True, but we don't use a debit card for any purchase nor do we carry hundreds of dollars in cash to purchase food. We also rely on our Disney card to earn most of our Disney rewards points.Moot point since they are switching to Visa but you don't need an AE to join Costco.