Check if the payment receipt given to you when you paid the fees for your application bears a stamp allowing re-entry into Cyprus. If so, then you should take this receipt with you and present it with your passport on the return journey. Before your trip, you should check with the destination country (embassy) if you need to secure a visa for that country. If there were no fees for your residence permit application (ie the fees were €0) and so you do not have a receipt, then you will need to visit the Department's head office to apply for a re-entry permit.The application form can be found here. Application for re-entry.
You must take your passport with you, stamps amounting to €10.25 stamps. Usually, the application is examined on the spot. If you have lost your receipt or if it is not stamped, you should apply to the Department for a re-entry permit explaining the reasons why you need to travel while your application is pending. As a rule, a re-entry permit is granted only for serious reasons (eg health) and for travel for other reasons you will have to wait for the issuance of your residence permit.