I would suggest you to first go through Wiki on using pcl_ros module (this) before asking here, but since you already asked, refer to this wiki on section 3.2. where it explains how to subscribe to a pointcloud topic using pcl::PointCloud<pcl::PointXYZ> message type (in the end it prints results). This wiki page should help you understand how this module works (in a very limited but a good starting point way) and how to use common Pointcloud data structures, one of which is PointXYZ (as it is essentially a C-style struct with x,y,z floats).