What's the pinyin for this/that character? 这个/那个字的拼音是什么?
What's the character for this/that pinyin? 这个/那个拼音代表的(or 对应的)汉字是什么?
I would use the words “代表(dài biăo)的” or “对应(duì yìng)的" for the second translation, because in general, you can determine the PinYin for a specific character (though some characters have two or more pronunciations). However, you can't always determine the character for a specific PinYin.
代表: to represent, to delegate, to stand for
对应: to correspond to
Edit: Answers to Alenanno. I would like to put them here because of the length
Sorry, part in () is an alternative. I should have put a "or" there (already edited).
When you ask the first question, I and I think other Chinese won't spell its PinYin (though, in English, it's common to spell a word), but show you simple or common characters with the same sound.
For example, you meet a word "畏葸不前", and you would guess the character “葸" sounds "sī" becaude it's similar with "思" (sī); however, you are not sure, so you ask me (it's a good habit to ask someone or consult the dictionary, don't ever guess the sounds),
这个字怎么读?(really, this is more common) and I answer,
它读作(or simply 读) “喜欢的喜"(or simply, 它读‘喜'), to show you the sound.
If you are completly strange to Chinese and you can't get its PinYin from my pronunciation, you would continue the question,
它的拼音是什么? and I answer,
Xi(I would repeat the sound, at a very low speech rate so you can catch the sounds of X and I), 3rd tone.
For your second question, I'll take another example. Suppose that you just heard this sentence on the TV:
"他买了200克当归"
tā măi le liăng băi kè dāng guī
You understood [tā măi le liăng băi kè] stood for "他买了200克" (he bought 200 grams...) and you are wondering what is "dāng guī", so you try to repeat that sentence, "tā măi le liăng băi kè dāng guī?",and ask me,
Huang, dāng guī是什么?(in this context, I may understand your question as "what is dāng guī?", instead of "what are the characters for dāng guī )
I answer, "当归是一种中药材"(dāng guī is a kind of Chinese herbal medicine).
You want to know the corresponding characters, so you continue the question,
对应的汉字是什么?(or simply, 怎么写?).
I may answer, dāng是当然的当,(dāng stands for 当 as in the word 当然), guī是归还的归.
However, if your Chinese level is very low, and you even don't know the words 当然 and 归还, you would continue to say,
怎么写呢?(how to write?), or 可以写给我看吗? (Could you please write them down for me?)