To install and configure your ROS Environment, you should apply steps on the website: http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment
You can go this website if you would like to reach more than this knowledge: http://wiki.ros.org/ROS/Tutorials
After installation, you must run these 2 command for every execution;
first run this command: roscore (If this is running on terminal there is no need to run again, just once is okay.)
Second rosrun turtles turtlesim_node
To make this file executable run this command on terminal chmod u+x ~/path/to/.py extension file.
To execute the file, run this command on terminal: Rosrun YourROSPackageName yourfilename.py