Spawning enemies

Hi guys, I am new to coding and would like some guidance. I want to make enemies spawn from the sky at random intervals, is there any one that could help me/ write the code. I have tried some ways but no luck. Any help would be appreciated.

Could you post the code that you have tried so far?