They’re called sitelinks and picked by google automatically based on relevancy and popularity. Ton of information about them online.
Sitelinks are generally displayed for navigational queries (e.g. brand searches)
There are other ones that can also show for information queries unrelated to brand search called fraggles or jumplinks (showed slightly different in small boxes, side by side. There are more things you can do there to influence them.