To access the Xbox online store you need an Xbox Live Silver account. To be able to play games online with other people you need an Xbox Live Gold account.
Xbox Live Gold usually costs £6.99/month. Once you have purchased a game that offers online play, this monthly subscription enables you to play with friends. The subscription also offers a few free games each month and good discounts.
You can access a larger catalogue of free games on your Xbox via Xbox Game Pass that provides over 100 top tier games and additional discounts.
Share Xbox Gold Live With Family
You can share Xbox Live subscription with other people who use the same console. Set the setting Profile & system > Settings > General > Personalisation
to My home Xbox
. Then, anyone who signs in to the console with their profile the ability to use your Gold subscription. Alternatively, if you sign in to any Xbox, such as at a friend's house, you can share your Gold subscription with everyone as long as you’re signed in.