Data can be fetched in Next.js using built-in functions like getStaticProps for static generation or getServerSideProps for server-side rendering.