You can pick up a lot of basic stuff from an online lesson but you wont get that personalised assessment of your playing. A good teacher will show you how to adjust specifically your sound, not just how to get a sound in general. You'll also get shown things such as posture correction - you'd be surprised how much difference that can make - and also have someone who can tailor lessons to the music you want to play, whilst giving you options you'd never come across before.
You asked about a friends giving you lessons; it can work to start out with but if they haven't had a good teacher or experience teaching then you'll get all of their bad habits. You should always go for the best teacher you can find.