An author can't really show an accent, except via spellings intended to suggest pronunciation, and in my view only a very little of that is enough to annoy many readers.
You can describe a character's accent, either via an omniscient narrator, or from the PoV of another character, in terms such as "quick", "sharp", "drawled", "high", "low" and the like. You can also describe the effect on particular phonemes or "letters". But this is also easy to overdo.
What you can show is a character's diction. Characteristic word choices are often closely associated with an accent. For example in David Weber's Bahzell series the title character and others from his nation use words and phrases that strongly suggest an Irish Brogue. In fact in this case it is IMO rather overdone, but it suggests the sort of thing that I mean.
The very careful way in which Tolkien used varieties of language in LOTR: Roughly modern English for the "Common Speech", Anglo-saxon and somewhat antique English for Rohan, quite formal for Gondor, Norse names (but not actual Norse) for people Dale and for Dwarves, etc; is perhaps hard for most authors to achieve, and many readers miss its subtleties. (But do read the section of Shippey's The Road to Middle-Earth on the Council of Elrond, where this is discussed in some detail.)
But some attention to the choice of words for each culture might help achieve a distinct effect.
Another example is the very careful way in which Mark Twain used differing local accents in Huckleberry Finn. In an introduction Twain mentions having used six different accents. As a river pilot he would have encountered the wide variety of speech patterns along the Mississippi, not then harmonized by the influence of broadcast speech. These differences are quite subtle, but are there if one pays attention.
I would advise against an American/Spanish or English/French distinction, or other obvious use of a "real" accent, such as is described in the answer by hszmv, unless this is an SF work set in the future where cultures clearly descended from current ones are present. I for one find such out-of-place cultural artifacts distracting. But some consistent distinction is speech could be a good thing.
Another thing one can do, as mentioned in the answer by KeizerHarm, is describe speech in terms of the reactions and associations noted by characters who hear it. For example:
Kayla's sharp, quick Azainian tones grated in Bolar's ears. It reminded him of all the things he has suffered at Azainian hands. But he resolved -- yet again -- not to let his resentment show. Kayla was on their side now, and they needed her badly.
"Stop lifting your nose, Marik", Jondar said. "I know I don't talk fancy like you and the rest of the court folk. I was raised on an estate, and I talks like it. But I know ten times what'n your lot do about sneaking through the woods, so this time you listen to me."
Marik sniffed at the crass way the farm lad put things. No graces at all, yet he presumed to instruct his betters. But, he reflected, Jondar had led them around the guard post safely, so he supposed he could put up with a few "what'n"'s and the low growly tone of his words. After all, a proper noble should be able to command, and learn from, anyone at all.
As he listened to the stranger in the tavern, Falma thought there was something just a bit odd about him. But when he said "... and we'll get them right where we want them" the "right" was so sharp-toned you could cut yourself on it. He sounded like Kayla, Falma realized. He must be Azainian, although he had said he was from Sandor, far to the East. He was probably a spy!
These show some of the ways in which character perception of speech patterns can tie into other aspects of character. They are a little clichéd, but then I just dashed them off, and have invented what context they have. (They are not from any work in progress or real work.) But they should serve as examples of the sort of thing I am talking about. Note that I have mixed informal descriptions of manners of speaking, such as "sharp", "quick", "low", and "growly" with more subjective evaluations such as "fancy" and "crass", non-standard spellings such as "what'n" and "talks", and emotional reactions such as Bolar's resentment, Marik's disdain, and Falma's alarm. In my view such a mixture works better than any one of these alone. But even so, this is easy to over-do -- passages like these examples should be scattered, and fairly rare, or the reader will revolt and abandon the book.