Nanite is Unreal Engine 5’s new virtualized geometry system which uses a new internal mesh format and rendering technology to render pixel scale detail and high object counts. It intelligently does work on only the detail that can be perceived and no more.
A Nanite mesh is still essentially a triangle mesh at its core with a lot of level of detail and compression applied to its data. On top of that, Nanite uses an entirely new system for rendering that data format in an extremely efficient way.
All that is required for a Static Mesh to take advantage of Nanite is a flag to enable it. Authoring content for Nanite is no different than traditional meshes except that Nanite can handle orders of magnitude more triangles and instances than is possible for traditionally rendered geometry. Move the camera close enough and Nanite will draw the original source triangles that were imported.
You can enable it during import, or by opening the mesh and enabling it there, or simply selecting a lot of static meshes and right clicking on them and enabling it.
Nanite does (currently) not support any Blend Mode besides Opaque, his includes Masked and Translucent blend modes, as well as World-offset. Meaning no trees, however it is on the list of features that will be added in the future.
In this screenshot we can see and overview (all rocks have Nanite enabled, the tree does not)
With a more complex scene it really does help a lot with performance, this feature is a game changer!
I recommend you check out the official UE5 documentation to get familiar with Nanite.
UE5 release version requires DX12 in order for Nanite to work, go to project settings > platforms > windows > set RHI to DX12 and restart the editor