@ehBeth,
You can tell by looking at it - it's paler in colour, the flesh is flabbier, and when you eat it, it's disgusting.
The stores can and should tell you if it's wild. Out where I am, all wild salmon is labelled WILD SALMON. If it doesn't say that, you can assume it's farmed.
Edit: In BC (well, Vancouver, at least), there was quite a riot when restaurants tried serving patrons farmed salmon. Within about a year, no restaurant with any reputation or who wanted to stay in business sold it.
Don't serve me spam in lieu of meat, and don't serve me farmed salmon. It looks like wild salmon that has been sitting in water for a couple of months.