Use the "If Global Mouse Pressed" event, and inside it add an "execute a piece of code" action with the following: instance_create(yourobject, mouse_x, mouse_y). This spawns your object wherever you click. For more help with these kinds of questions, the Game Maker community forums are a great resource.