There are different approaches to this.
Customization is shipped with the official QGIS release. It offers to modify various parts of the user interface, like removing buttons and panels.
The customized UI can be saved in a .ini file and restored later on.
If you need custom additional buttons and logic, have a look at python plugins.
You can create a complete standalone application with the QGIS libraries. It allows you to do whatever you want but you will have to write a lot of business logic again which is not part of QGIS' public API which you get for free from stock QGIS with the customization + plugin version.
A standalone application can be written in python (or C++)
You can take the current source code and modify it to your liking. Be aware however that it will be a lot of work to maintain such a copy of the source code so unless there is a very good reason I would not do that.
If you start thinking about this approach, it will be best to write down why you want to do this and contact the QGIS developer to check if your changes can be made generic enough to be included upstream (while improving QGIS at the same time).
A fork needs to be written in C++
The license of QGIS is GPLv2+, so it allows you to take and modify the code and redistribute it under the same license. This means that you will have to ship a copy of your modified sourcecode with the application. As long as you do that, feel free to change it to your liking.