PWM to Voltage Conversion using Arduino

You can use the function pulseIn to measure the width of the pulse from the sensor.

This will give you the width of the pulse in micro seconds, divide this by 1000 to get milliseconds, and use the formula given in the datasheet to calculate CO2 concentration.

Looking at the datasheet for the sensor, it appears to have an analogue output and a UART output as well as the PWM output.

You could read the analogue output directly from an Arduino Analog Input.