Ask your friend to send you their Bitcoin receiving address – they should use their Bitcoin-Wallet to create and show them a new receiving address for this transaction. They can then send you the Bitcoin-address in email etc. It will look something like one of the following examples (don’t use these):bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
or3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy
or1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
They can instead send you a QR-barcode that you might be able to scan into the Bitcoin machine. This is probably less prone to mistakes. If you make a mistake the money is lost – bitcoin transactions cannot be undone, cancelled, or reversed.
At the Bitcoin machine, make sure it is not creating a new wallet or a new account with some business but is instead sending the purchased BTC directly to an address of your choice. The details depend on the make and model of Bitcoin machine. You may have to choose some specific options on the machine. Enter or scan your friend’s address as the receiving address and double-check it. Make a note of any transaction-ID and/or keep any paper receipt.