Hey, Usually ill have a discussion with the developer about what they want, what I can do and when they need it by. If there's already screenshots and scenes from the game it makes it easier for me to target key ideas and transform them into music. I normally go off feel depending on how things look etc. Hope this helps!
Doesn't cost me a dime, just time! But if you're asking how much I charge for custom music it depends on a lot of factors such as song length and complexity but it is usually around $50 per finished minute of music. I am however currently working on some asset packs that I will be posting that will be much much cheaper than custom music.