A speaker or writer uses myself to refer to himself or herself. Myself is used as the object of a verb or preposition when the subject refers to the same person.
I asked myself what I would have done in such a situation.
我问过自己在这样一种情况下我会做什么。
You use myself to emphasize a first person singular subject. In more formal English, myself is sometimes used instead of 'me' as the object of a verb or preposition, for emphasis.
I myself enjoy films, poetry, eating out, and long walks.
我本人喜欢电影、诗歌、外出就餐和远足。
If you say something such as 'I did it myself', you are emphasizing that you did it, rather than anyone else.
'Where did you get that embroidery?'—'I made it myself.'
“你从哪儿得到那件刺绣的?”“我自己做的。”