In order to get gems in PK XD you have to complete tasks and achievements. Once successfully done, you will get the reward in the form of gems.