How to filter a a variable in a plugin’s function?

How to filter a a variable in a plugin’s function?