recording music on cassette recorder

using the audacity program on windows how can I record youtube music on my cassette recorder that is connected to my computer with a usb cord

Are you sure that your cassette machine is able to record via USB? Most can only play (not record) via USB.

See here in the manual for how to record sounds that are playing on your computer with Audacity: http://manual.audacityteam.org/o/man/tutorial_recording_audio_playing_on_the_computer.html