Lots of people say betta are solitary fish, and this is largely true.
Under no circumstances should you put multiple male betta in the same living space.
Under no circumstances should male and female betta live in the same space for long term.
Keeping females together requires very specific setup and some generally chill-headed (for betta) fish, and should only be done if you have experience with betta fish.
I'm going to repeat that in bold text to make sure you get it. Under no circumstances should a male betta fish live in the same living space as any other betta fish.
Betta fish do not like to live with each other.
Betta fish that live with each other frequently kill each other.
On the other hand, betta fish can have tank-mates.
When you're looking for a tank-mate for your fish, you need to take into account both what your fish needs to be happy and healthy and what the other members of the tank need to be happy.
Full disclosure: I do not have experience keeping betta fish with other fish. Most of what I am sharing here is synthesis of other people's research and experience, and not my own research and experience. Before you put other animals with your betta fish, make sure you do your own research. I do not know your fish or your life and I cannot do your research for you.
Is my tank big enough? Just don't try to do a mixed-species community tank in a tank smaller than 10 gallons, and I suggest going bigger. There's several reasons why. First of all is the bio-load. All living animals that you might put in a tank produce waste. Your filter (and you need one for a community tank) takes that waste and makes it into less toxic nitrate, but nitrate is still toxic in large amounts, and you don't want it building up too fast. Apart from the nitrate, the waste your tank inhabitants produce creates solid waste on the floor of the tank and in the gravel. If you have too many inhabitants, these things will build up faster.
The other reason why you need a larger tank is that different species of fish (or other animals) do not always like living in close quarters with other species. Everyone needs room to have their own territory. Some species are also social (zebra danio) or schooling (cory catfish, tetras), and you need enough room for six or more of them.
In general, betta like to occupy the top 2/3rds of the tank, so they do better with animals that like to stay in the bottom part of the tanks. Because of this, I suggest going against danios (including their glofish cousins), who also like the top of the tank.
Are the living requirements the same? Betta fish need water that's 76F-82F. They need tanks with a decent amount of cover. They need to reach the surface to get air.
Therefore, if the tank-mates do not also do best with water in the 76-82 range, or if they need to not have dense planting, or if their other living requirements do not match the betta's requirements, you should not put them in the same tank. For this reason, I suggest against African Dwarf Frogs. They need cooler water.
Are they going to provoke the betta? Betta fish like to attack anything quick moving or brightly colored, or anything that shows it too much interest. For this reason, I do not recommend putting a betta with neon tetras, who are very bright. Glofish are out. Lyretail mollies have big fins that draw betta's attention.
Are they going to attack the betta? The answer to violence is not more violence. The answer to an aggressive fish is not another aggressive fish.
Betta tankmates that I've personally had good luck with: ghost shrimp (and I've heard that other nonaggresive shrimp like bamboo shrimp work very well, though cherry shrimp can become dinner if your fish is so inclined), pond snails and other snails that are small (including mystery snails and apple snails, if you have a backup plan for when they outgrow your betta tank), and marimo. Due to the extra stress of making sure that everyone in the tank gets along, and the fact that some days I work a lot of hours and don't get a chance to look at my tank beyond feeding everyone, I don't keep community betta tanks with other fish. I'd rather just have more betta fish. I do really like ghost shrimp with betta, though. They're exciting to watch and generally stay at the bottom of the tank. They're willing to defend themselves if the betta gets curious, but they rarely actually attack the betta. Marimo are not animals. They are balls of algae. However, you can give them a name and talk to them, and they never disagree with your betta. Marimo are the perfect pet.
Now you need to ask more questions:
How aggressive is your betta? Some betta fish are very aggressive, and some aren't as aggressive. If your betta flares at everything that goes past, he's probably not a good candidate for tank-mates.
If you are purchasing a betta specifically to put in a community tank, consider getting a female. While aggressive, the female betta are generally less aggressive than the males. While your fish (boy or girl) is in quarantine for 30 days (which you should do with every fish that you will put in a community tank), you'll get to know them and their aggression levels. If you buy a betta to put in a community tank, be ready to give them their own environment or rehome them if it is clear that they are too aggressive for the community tank.
But what about sorority tanks?!
Lots of people like to crap on sorority tanks, but I have seen them done well. A sorority tank is a large (20long or larger), very densely planted tank, with at least six female betta in it. Once you establish the tank, the girls will establish a pecking order and territories, and stop trying to kill each other. It's very important in a sorority tank to carefully monitor it for stress or bullies, and to be ready to have a place to have an overly-aggresive stay in a solo tank (or ready to be rehomed), in case things don't work out.
I do not suggest a sorority for a first tank. I think you need experience learning how to identify healthy fish and stressed fish and sick fish before you try something this complicated.
In fact, I do not suggest a community tank with betta and other fish as your first tank. In a community tank, you need to know what it looks like when your fish are hungry or sick or stressed. You need to know how to be in tune with how your fish is feeling, before setting up an environment where that is likely.
Remember, when you're an aquarium owner, keeping the fish healthy and happy, and meeting their needs, is much more important than what you think will look good. You are in charge of their entire ecosystem, and you owe it to them to have it be a safe and healthy one. If you want fish that will do whatever you want, that you can look at without needing to worry if they'll fight or become stressed, well, there's a lot of iPad apps for that that you might want to check out instead of hurting real fish.