Entities are your game objects.
Every new entity class needs to be registered in bge.preferences.EntityPreferences, else the engine will crash.
They can be saved with Serialize and loaded with Deserialize.
To save all of your entities, just call Serialize on your EntityManager.
Don't forget to open the file with bge.Helpers.openFileForSerialize() / bge.Helpers.openFileForDeserialize()
There is a manager type called bge.managers.EntityManager, wich you need to initialize yourself in the desired game state. (Or somewhere other)
You can add entities to an EntityManager with several functions, either directly or by creating them with the class alias.
You can make trigger functions, wich can be "programmed" on the entity. As an example: The event "onAction" occurs on entity A. It then searches its trigger list for a trigger wich will be executed on that event. There is one wich says that the function "open" will be executed on entity B. It now searches the EntityManager for entity B and then calls execute("open") on that entity. Luckily, you have created a trigger function wich reacts to "open".