It depends on which method you use to self-publish.
The default is you can publish there, and have the rights to publish anywhere else as well.
However, Amazon offers a different plan called KDP Select, and this requires you to lock-in to Amazon exclusively for 90 days. Then you are free to publish elsewhere.
KDP Select is an optional program for you to reach even more readers and gives you the opportunity to earn more money. By making your book exclusive to Kindle, required for the 90-day enrollment period in KDP Select, the book is eligible for the following:
The Kindle Owners’ Lending Library in the US, UK, Germany, France and Japan
Earn a share of the monthly global fund each time a Kindle reader borrows your book from the library
Free promotion for up to 5 days , during each 90-day enrollment period
70% royalty for sales to customers in Japan, Brazil and India
So, depending on what you want to do, and use Amazon's marketing muscle or not, you still retain all distribution rights after 90 days.