You can set Command-Blocks in your world and put a command in it. The command get executed every time a redstone starts powering the block.
In case of the
testfor-command the block itself will emit a redstone signal which you are able to catch with a Comparator.
If the state you test for is true the Comparator will return a signal. It will not return a signal (or disable the current active signal) if the statement is false.
In your case: When you power a commandblock and a Player is nearby thoose cooridantes you will get a signal from the Comparator you can hook up to other contraptions such as a door or another commandblock. You could use this to open/close a hidden door only when you or one of your friends is nearby. You would have a door thats closed to everyone the command doesnt look for. Or when a player goes into your store you could whisper to them what you're currently selling.
I can recommend working with redstones to anyone. Working with redstone is much fun and if you ever need help again feel free to just ask the community :)