Just as the inbuilt language of Game Maker is GML, the in-built language of DS Game Maker is called 'DBAS'. DBAS stands for 'Dynamic Basic' and it closely resembles the famous 'Visual Basic' by Microsoft.
You can use DBAS almost anywhere in DS Game Maker. You can write 'Scripts' of DBAS which you can run in the game, and you can write DBAS in the 'Execute Code' action. You can even put DBAS functions into action arguments, or into actions themselves.
The first step in mastering DBAS is to learn the syntax. You should also see the functions reference which documents all of the available functions in the language. Finally, see the below tutorials and the DBAS discussion forum.