Pernah marks experience: this has happened at least once in your life.
Pernah ke Bali? ‘Have you ever been to Bali?’
Pernah. ‘Yes, I have.’
A one-word question and a one-word answer. This is one of the most efficient exchanges in the language.
The two negatives, and they differ
Belum pernah ‘not yet, never so far’
Tidak pernah ‘never, and that is the situation’
This is the sudah and belum distinction from A1 applied to a lifetime. Belum pernah implies you might; tidak pernah implies you do not and will not.
Belum pernah, tapi mau. ‘Never been, but I’d like to.’
Saya tidak pernah minum alkohol. ‘I don’t drink alcohol.’
Answering tidak pernah to a friendly pernah ke Ubud? sounds oddly final, as though you were refusing on principle. The natural answer is belum.
Frequency
sering ‘often’
kadang-kadang ‘sometimes’
jarang ‘rarely’
selalu ‘always’
Saya sering ke sana. ‘I go there a lot.’
Jarang. ‘Rarely.’ A complete answer.
Pernah with a time
Pernah tinggal di Jakarta dua tahun. ‘I lived in Jakarta for two years at one point.’
The experience is in the past and finished. Combined with sudah it changes:
Sudah dua tahun di Jakarta. ‘I’ve been in Jakarta two years’, and still am.
The politeness use
Pernah softens a question about something that might be sensitive, because it asks about experience rather than about the person.
Pernah ke dokter? ‘Have you seen a doctor about it?’
What you’ll actually hear
What the book says: Apakah Anda pernah mengunjungi Bali?
What you’ll hear: Pernah ke Bali?