Games like D&D 5e and Pathfinder will tell you they're don't require being on a gridded battlemat, but combats tend to run a lot smoother - and take more full advantage of all the various combat mechanics - when they do. Things like the range for attacks, area of effect for spells, and whether or not someone can move without drawing an attack of opportunity or blocking a door all become a lot clearer with a battle mat. Heck, I find combats in D&D 5e actually run faster - and more interestingly - with a battle mat because you don't have to keep reminding people what is going on or what monster is where, nor figure out how far a given monster is from a given PC. It's all their on the mat.
That said, miniatures get expensive. Fortunately, there are some cheap alternatives.
Representing the PCs
If you're going to splurge on anything, I'd recommend doing it on the PCs. You're going to be seeing these every fight, and unlike everything else in a given battle it is going to be the same character unless something bad happens. You can get custom miniatures for a 'reasonable' price from HeroForge, but I honestly don't recommend doing that until the PCs have crossed the line (around level 5) where death goes from being a permanent problem to more of just something to be worked around. Reaper Minis also has the Bones line which has a lot of cheap minis. They don't have the specific match for every character type, but they probably have something close enough.
Don't Use Dice
You may be tempted to use dice to represent players or monsters. This is a bad idea. Why? because people are going to be rolling dice - often on the mat. Also, when someone is looking for a die I guarantee you someone will grab the die representing some monster r another before they even realized what they did. Beyond that, dice are meant to roll. Any shift on the table or hard bounce can move them easily. It just doesn't work super great.
Starbursts Work Well, If You Like Gum
I rather enjoy using Starbursts Candies for regular minions and monsters. They're cheap to buy in bulk, a bag will generally last you several sessions, and it lets your PCs eat what they kill. Eating what they kill can work out well because if people are talking a lot - as sometimes happens in games - the star bursts can help keep their mouth from drying out. Beyond that, some folks just like it. It can be fun to collect your kills, and to have a snack from them.
The other benefit to starburst is they come wrapped in wax paper. This means 5 red starburst and a sharpie marker and you can have 5 numbered star bursts so you know which candy is which of the 5 goblins fighting the PCs.
Coins and Soda Caps
If you want something re-usable, quarters, nickles, and the caps from 20oz and 2 litre soda bottles work well for medium and small creatures. These objects fit neatly into the 1" squares of a battlemat, are stable there, and easily distinguished from dice. Just make sure you clean the caps out with hot water first or you might get your mat sticky.
The other fun thing you can do with caps is take the rings that are normally left on the neck of the bottle. Get those off, match them in pairs by colors, and you have easy status effect markers. Hang a red ring on a monster and PC to show that the PC has hunter marked that monster. Use a yellow one on both monster and PC to show a charm person spell in effect. The colored ring serves as a mental reminder the monster/PC has a status effect, and who is maintaining that effect.
If getting those rings off is too hard or inconvenient - it was for me - for about $5-$10 you can get a container of about 100-500 small colored elastics. Those work for the exact same purpose as the soda cap rings, but have the added benefit of being stretch if you're using cardstock for something, or need to get the status effect around something a little bigger than the band is normally.
The best thing I've found for large creatures is Gatorade caps. Snapple caps work too in a pinch, but gatorade caps are the perfect size. They beautifully take up a 2x2 square, which is the size of large creatures. Gatorade frequently is on sale - and even easier for me one of my players almost always buys two when coming over for game, so we just saved them.
Snappe/Yoohoo caps aren't quite as ideal but can do in a pinch. As can the caps from milk bottles. The other benefit to Gatorade caps though is if you have a marker for a medium creature and it becomes large, those markers often fit neatly into the cap letting you keep the original marker.
Finally, standard dice boxes, the kind you get a setof dice for RPGs in, also work for large creatures. The clear plastic box also works for flying creatures, or if you need to put one thing over another, since a small mini will fit in the opening where the dice goes, and the other mini will fit ontop of the box.
I've only recently gotten into huge creatures, but so far the best thing I've found for cheap is a Princles cap. Like gatorade caps you may or may not have these coming to your gaming table on the regular. They're usually fairly clean since pringle containers are also sealed with a paper cap that is peeled off. The fit here isn't as great as a gatorade cap for large, but it works.
I'd Really Like Something More Official
If you prefer a more authentic experience, the Paizo Beastiary Boxes are probably your best bet. You get a bunch of cardboard cutouts for monsters, and minis to hold them. Just keep in mind if running D&D 5e that some monsters are a different size in Pathfinder than they are in D&D. That said, while each box gives you a lot of things to work with if you are doing a concentrated encounter where you need more than 4 of a given monster, you're going to need multiple boxes.
I have the boxes. I have the Beastiary 1 and the NPC Codex. I use them at times for bosses or significant encounters. Otherwise I tend to use the Gatorade Caps and such I mentioned here. They work just as well, and serve the full purpose. Also, they're easy - and there is less of them - to store.