As much as we would love to able to see into other people's minds, this is something that sadly none of us has mastered yet, so I'm afraid you'll have to provide us with more information.
1. You can use any text editor to write the code.
2. Save it to any folder you like (it is common to use the .cpp suffix, e.g. hello.cpp)
3. Open your console, browse to the folder, that contains your hello.cpp file
4. run the following command: g++ hello.cpp
5. This should have produced the file a.out (or some error messages)
6. You can execute your file by typing ./a.out
If any error occurred or you have got questions to one of these steps, you can post it here. I hope, i could help.