What is code for installing a dishwasher in the U.S.?
Assuming you're in the US (though I can't imagine it being much different elsewhere, but do check!) ...

Be sure to check the label, but most dishwashers run perfectly happy on a 15A circuit. If a dedicated circuit to the dishwasher isn't possible, you can come out of a general receptacle circuit that isn't otherwise utilized in the kitchen, depending on the rating of the dishwasher. What you want to avoid is a mixer and toaster and dishwasher using the same circuit at once. You may have to do some investigating. Go for the dedicated circuit if that's possible.

NEC 210.8.D specifies that dishwashers must be GFCI protected, and doesn't differentiate between cord-and-cap or direct connection (as it defines an outlet as any connection). However, not all states have adopted this because of the nuisance factor of older appliances and older GFCIs that tended to be overly-sensitive to fluctuation on the neutral leg. Check what applies in your state; you may want to just use a GFCI breaker on the branch circuit feeding the dishwasher as that's the easiest way to be sure, or be absolutely certain you're coming out of the "load" side of a GFCI receptacle that won't otherwise see much use. 

Otherwise, if the dishwasher has a cord and cap, you should have an appliance receptacle installed where it can be reached. An appliance receptacle is an outlet with only one place to plug something in. If your state doesn't require the dishwasher being GFCI protected, they'll absolutely want to make sure you use a single appliance receptacle so nothing else can be connected to the unprotected receptacle. Finally, if directly wiring it, just make sure you use the appropriate connector if the vendor doesn't supply one.

Be kind to your future self, or anyone else that has to pull the dishwasher out in the future to service it by leaving enough cable to be able to pull it out and off to the side. Make sure the cable is secured properly wherever it is fed, and protected anywhere that it may be exposed on its path to the dishwasher. 

If uncertain or uneasy - you probably want to call an electrician.