How to make Procedurally Generated Terrain

How to make Procedurally Generated Terrain and use chunks (like minecraft) as not to lag