How to put songs from YouTube onto your iPhone?

How do you put songs from YouTube onto your iPhone?

Access to youtube account, just press the upload button. Thats all.

It is illegal to put music from YouTube onto any other device UNLESS the author of the content specifically says you may. This includes all music that you can pay for on Amazon or Itunes. If you can buy it, you must. Even some music you can't purchase may not be available to own for free, either.

Assuming you are taking music you are allowed to:
There are programs that do exactly that. A Google search will find them (Can still be illegal).
You can use an audio recorder like Audacity and switch the input to your computer's sound (Is usually illegal).