If you are just going to re-center a piece on its square, without intention to play it, the typical way is to inform your opponent beforehand with the traditionnal, worldwide used sentence:
J'adoube.
In English-speaking tournaments, sometimes players say instead
I adjust.
Among strong players, if it is absolutely obvious that you are not going to play a piece and you just want to replace it, sometimes just a small gesture by the hand or an eye-contact is enough. But if you want to avoid any ambiguity, say the magical words before you touch the piece !
This is explicitely mentionned in Fide's rules of chess, article 4.2.1:
Only the player having the move may adjust one or more pieces on their squares, provided that he first expresses his intention (for example by saying “j’adoube” or “I adjust”).
"J'adoube" is a French sentence referring to the medieval accolade. As far as I understand, touching a piece with your fingers without intention to move it is reminiscent of dubbing the knight-to-be with the flat of the knighting sword without intention to harm him.
Of course, if you have touched a piece intending to make a move but changed your mind, saying "j'adoube" won't allow you to repair your blunder. Kids try it sometimes, or grandmasters...
A pronunciation of j'adoube