Steps to run Appium tests on real device which is connected to remote machine

Are there any page or blog where I can find how to run tests on read device which is connected to remote machine.
I should start appium on client machine or on remote machine or on both machine?
it would be great. I am trying since last three days.

Simply have appium running on 0.0.0.0:4723 on the remote (which is the default host/port) to which device is connected. Then you can run your appium test on the local PC, with your command executor set to http://ip.of.mac.comp:4723/wd/hub, and the test will run on the local but send commands to the remote.