How to either import posts with the custom fields?
ACF uses a post type and custom field metadata to save all the custom field objects.
This means you can use the export feature in ACF to obtain a .xml file which you can import into a WP install via the default WP import tool!
Or how to get all fields of a field group?
Are you asking how via code?