Let's say I wrote a paper and got it accepted in a journal. Can I then give a talk on that paper at a conference? What are the relevant factors here?
This may depend on your field and its customs. In mathematics, it's totally acceptable and happens constantly.
However, if the conference publishes proceedings (only a few math conferences do), you should not publish the same paper in the proceedings. Some people use the proceedings paper to write a "survey article" intended to give the reader a broad view of their work and other related developments in the field, but they would usually not consider this to be an original research paper.
In other fields, where a conference talk is considered to be like a publication it its own right, this might not be acceptable.
It will depend very much on your field, and even the conference.
As JeffE mentioned, some CS conferences will expressly forbid papers that are already published, because the conference is meant to disseminate new work.
Similarly, some major medical conferences will have an embargo on the work until it is presented - this is often coordinated with the journal the work is being published in so that they go "live" the same day.
On the other hand, many conferences in public health have presentations expressly about previously published research, or on a study or topic for which multiple papers have been published.
As others have mentioned, this might depend on the field. In my field (linguistics), I would say it's very uncommon to give a talk at a conference about something you've already published (a possible exception being invited talks).
I wouldn't say it's frowned upon, though - it just doesn't happen. And it doesn't happen for good reasons:
What is the point of giving a talk on something you've already published? You can't use comments and suggestions from the audience to improve your work, and why would the audience even listen to your talk when they can read your paper in a journal?
Maybe people in other fields think differently about these things.