You were scammed, as the others have said.
The big question is: did you actually give him remote access to your computer, or did he just tell you that he was accessing your computer remotely?
In order to give him remote access, you would either have had to give him your Apple ID password and enable the "Back to My Mac" functionality, if it wasn't enabled already, or you would have to install remote access software that he told you to download. Did you do either of these things? If so, your computer and all your online accounts should be considered compromised. You will need to erase the hard drive and reinstall everything from scratch. See:
How to reinstall Mac OS X from scratch
(Fair disclosure: The Safe Mac is my site, and contains a Donate button, so I may receive compensation for providing links to The Safe Mac. Donations are not required.)
You will also need to change all passwords on all online accounts, especially your Apple ID if you gave him that password. If you gave him a credit card number, that credit card should be cancelled and any strange charges disputed.
If you did not do either of these things, he didn't actually have remote access and was just trying to trick you. If you did not install anything at his request, give him any passwords or give him a credit card number, you're safe and you don't need to do anything else.