How do I add a local backend in my Ionic Android app?

I want to add a backend, using a local database. Is it possible to bundle a backend made in node/php within the same .apk, that is started with my app?

Can someone send me a guide or explain a little of how does it work?

Not sure what you are trying to do but you can use a local DB in your app.

SQLite is one option which there is a Capacitor plugin for - GitHub - capacitor-community/sqlite: Community plugin for native & electron SQLite databases

SQLite is an open-source relational database i.e. used to perform database operations on android devices such as storing, manipulating or retrieving persistent data from the database.
SQLite implements serverless, self-contained, transactional, zero-configuration SQL database engine which is an in-process library.