Typically baskets have hooks which may or may not fit on the handlebars or rear rack depending on model and make, so try before buy. Don't load the basket too heavily to begin with as it may affect your balance. An alternative is to strap or bungy any old bag onto the rear rack.
Be safe! Lights front and rear. Use them as soon as visibility is reduced, even in fog or rain. I would also strongly recommend always wearing a neon coloured reflective vest. The more visible you are the better!
You're very welcome to ask more questions. There's a huge wealth of knowledge and experience on this forum. Let us know how you're getting on. It may also serve as inspiration to other beginners.