i'm new in sharepoint, i would like to create a tree of folders automaticaly in a document library when i create a folder "project" then in the sub folders there are a content types it's possible to do that or i have to code it Thanks in advance
Using folder is not a good practice. I believe you might have chosen this folder approach because SharePoint is new field for you.
Instead of folders you can use Metadata. Then you can create views to filter data based on your requirements. There a plenty of benefits from this approach.
If you want to stick with folders, then I believe what you are looking at is called Event Receivers. You should create and handle ItemAdded event for your document library and code to create required folder structure.