Detecting a bluff has a lot to do with how they played the rest of the hand and what the board texture is. If the bet sizing and behavior of your opponent (i.e. limps/checked street/passive preflop play) indicates they were possibly drawing for a hand, but came up short on the river, they could potentially be trying to turn their hand into a bluff if they lead out for much more than they were previously or if they re-raise you after playing passive the whole hand and the river is a blank. That being said, it is by no means 100% and some of your decision making must come from getting an accurate read on your opponent based off of more than just this hand.
As for making a bluff, essentially apply the aforementioned logic to your own hand, but don't make it blatantly obvious. Bluffing is all about deception; if you play weak all hand, then shove on the river when all drawing hands missed, it is predictable. Playing strong/consistently throughout the entirety of the hand is important, just be careful to not do so recklessly.