Hello hello! Lilfishie is correct as the only possible way for a male betta to be housed with another without a divider of sorts is if the bettas are siblings - and even then it can be dicey as to whether they'll tolerate each other or not. Females tend to be less aggressive and can be managed in groups of four or more to maintain a decent pecking order - but there will be nipped fins.
If you ever are considering breeding your bettas - there are also more things to take in consideration and preparation as well. When you're prepping your bettas to sustain egg production and keep the male alive while he guards the eggs/fry they need to be stuffed with high-protein foods. Mixing egg white/yolk raw with flakes into a paste I hear is a good means of doing this (but will make your water messy as hell really quick if large quantities are added and is usually used to feed growing babies) as well as frozen/live bloodworms and brine shrimp.
The next aspect is preparing the tank itself - you can't use a standard filter because the fry are quite small and will get sucked into the filter once they become free-swimming. There's a tutorial on how to make a homemade and cheap sponge filter for this floating around the forum. The heat in the tank would need to be kept around 80 deg. F and a lid with the tank 2/3 full because the heat and moist air are important I hear for the young to develop right before slowly adding water.
There are steps to properly breed two bettas together, but the tank setup for the babies tends to be more expensive as people usually invest in a 20 or 40 gal breeder, and then buy quart jars to separate all the males in. Not to mention babies need to be fed about twice a day.
Some people however are successful keeping two bettas, whether m/f or m/m - but you have to be watching them a lot to make sure they don't try to kill each other. I've had several very laid back bettas ignore each other while they're in the sink while I cleaned their gallon tanks but it was only brief, and that was long before my numbers slowly reduced and I moved to larger tanks.
Sorry for the mouthful of words but welcome all the same! I hope you'll be able to learn a lot from other people's experiences to become an adept fish keeper!