Indonesia 's 18,000 islands sit atop tectonic plates that frequently slam together to cause massive earthquakes .