Ways to compose... (that you might not learn in school)
1. Improvise. Not jazz (necessarily). Not necessarily on the piano. Start with a mood, a rhythm, a motif, an image. Try out all kinds of things: melody, harmony, timbre, rhythm. When something interesting comes along, stay with it a while, turn it up, down, sideways.
2. Listen. Listen to all sorts of music. Listen to kinds of music you have never heard before. If you listen to opera a lot, try country western. If you listen to Bach, try African drumming or a gamelan orchestra. Listen with wonder. Listen and see what you can steal - rhythm, timbre, extended techniques, form, atmosphere, harmonies.
3. Write the program notes first. Describe in words what the piece is like in a sentence. Then a couple. Then a paragraph. Then two, then four. Keep adding detail. Don't stop because you're not sure; write something, anything. You can always change it later. Keep going at all costs. Give it a name (a title). Then translate the text into notation, perhaps very generally at first: a key, a style, a mood, a tempo, an instrumentation, an amount of time or number of measures. Add detail later, the way a sculptor creates a statue. The detail comes last. Just get the general outline done first, very briefly.
4. Make a diagram. Something like a city skyline or mountain range can show how you want the piece to build, where the peaks are, how long or how fast you want to go up or down. Make squiggles, loops, jagged lines, playful doodles. Draw how you feel. If you allow yourself to precede music notation with other forms of graphic notation, you can get a lot of place quickly that only notation can't take you. Eventually you can start translating the squiggles into regular notation. But let your fancy off its lease for a while and see what happens.
5. Write lots of short stuff. Write quickly; throw a lot of it away. Grab for more paper and write some more. If you go for quality - i.e. try to write an immortal work for the ages - you'll agonize over every note and soon grind to a halt. Be playful. Write and write some more. Writer's block? No problem. Write whole notes. Lots of them. Write quarter notes. Play your piece or sing it at the top of your lungs. Have a good laugh at yourself, throw it away and keep writing. Read Joel Saltzman's "If You Talk, You Can Write." Just substitute "compose" for "write" all through the book.
6. Be honest. Write what you like to hear, what you would like to play - not what you think is going to impress someone else.
That's a start....