Following code will Extract list of all the objects in Salesforce and their fields in Map.

Map<String,Map <String, Schema.SObjectField>> SchemaMap_with_field=
new Map<String,Map<String,Schema.SObjectField>>();
Map <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
//Iterate over the keys and get their related fields
for(String key : schemaMap.keyset())

As you can see that in this recipe we are using Schema class getGlobalDescribe() method to get all the SObjects and then we are iterating their key values which are SObject name to get all related field using the getDescribe().fields.getMap() method.