Basically you have to think about lighter or darker roasts. Coffee is a bit like malt: darker roasts have more chocolate, roasty, burned kinds of flavors; lighter roasts are fruitier and brighter, more like caramel or toffee. But all of that is being blended into a very dark beer that has its own strong flavors, so it's tough to say exactly what the sum will be and what will shine through.
For example, I personally don't much care for dark-roasted coffee, but stout is a very dark beer, so the flavors that might seem harsh on their own in a cup of coffee will probably blend better into an overall beer.
Another big consideration IMO is the method of making the coffee. You can brew it hot or cold. Hot will extract more of the harsh, roasted flavors from the coffee, and more acidity. Cold takes longer and leads to a mellower, rounder, less acidic profile. In a lighter beer, I think cold-brewed is often the way to go, but in a very dark beer, again, hot could work too. You can add at bottling, at brewing, or by steeping grounds in the primary/secondary. I think the bigger difference is hot vs cold extraction.