The ROS interface is part of the V-REP API framework.
ROS is a distributed pseudo operating system allowing for easy management and communication between multiple computers connected in a network. Please refer to the official ROS documentation for details about ROS.
V-REP can act as a ROS node that other nodes can communicate with in following 3 ways:
The ROS functionality in V-REP is enabled via a plugin: libv_repExtROS.so or libv_repExtROS.dylib. The code to the plugin is open source and is located in the programming/ros_stacks folder. The plugin can easily be adapted to your own needs. The plugin is loaded when V-REP is launched, but the load operation will only be successful if roscore was running at that time. Make sure to inspect V-REP's console window or terminal for details on plugin load operations.
Have a look at following simulation scenes for a quick start with ROS & V-REP: