Hello pradeep and welcome to the Dubai forums
If you mean residence visa cancellation, take your passport and your family member's passport to the DNRD
typing center, fill in application forms for visa cancellation, and follow their instructions (it should just be to take forms to airport when your relative leaves). Then you'll need to go back to the DNRD to get your deposit refunded. Here's more information about Dubai residence visa cancellation
For visit visa cancellation, there's nothing you need to do, it gets cancelled automatically when your family leaves. Just go to the DNRD after they've left to get a refund of your deposit.