Create a new document, im using 400×500 pixels for this example. Select the pen tool and draw your path that you want the text to follow.
Select the text type tool and hover it over your path untill your cursor changes. Like this.
When it changes click with your mouse button, you should then see your flashing text cursor (the line that blinks). Now type what ever you need to type.