It is a little cheeper to get into Warmachine than Warhammer...
For Warmachine you can get a a starting Battlebox for about $40 and a Rulebook for $25, that will give you everything you need to play your army and have some good games. Then you just add one unit/solo at a time on to that to build your army. So looking at about $65 entrance price not including the cost of a couple of paints and some glue.
For Warhammer 40k/Fantasy you would need to get a Battleforce Box $125, a HQ to lead your army (because it doesn't come in the Battleforce) $20, Rulebook $75, Army Codex $42. So looking at about $265 entrance price not including some paints and glue.
There are two player starter boxes for both games too that have everything for two people to play some small games. Warmachine/Hordes Box runs for $79.99, has two good size armies for Warmachine, pocket size rulebook and all the stat cards. Warhammer 40k's/Fantasy's 2 player box runs for $99.00, has two decently sized armies for a smaller game, pocket size rulebook, and a booklet with the army stats in it (if you want to expand either army you will have to buy the codex/Army Book eventually for that army too though).
I have played both for many many years. I started with Warhammer 40k and it still holds a special nostalgic place in my game room... that being said I no longer play 40k. The reason being simply because GW overcharges for a product that simply isn't better any longer than other games on the market. It is worth nothing that GW raises there prices once to twice a year like clock work. They have only ever decreased the number of models in a box while raising the price and they put all of their army's stats into codex books forcing you to buy them separately. Their rulebook is also more than double the price of most other games but usually about the same size and quality.
I have since Switched to Warmachine/Hordes (both games are compatible to you can play armies from either game against each other), Malifaux, and Infinity the Game. All three of those games are just as good (in some cases better) rules wise, Just as good if not better miniatures quality wise, and cheaper than GW games are. (I still play Warhammer Fantasy every once in a while because I always thought that was a better game than 40k anyway but I also still have a large orc army for it from a long time ago, but I don't buy new stuff from GW).
About the Games themselves:
GW games have pretty simple mechanics. Army building can be very customizable allowing for armies even in the same faction to be very different. Due to the way the mechanics work and army customization 40k very quickly escalates into a "Who has the bigger gun" game. A lot of the time this is also fueled by "Codex creep" which is when they release a new codex for an army (rewrite their stats and rules) that army is usually marginally better than every other army in the game. New bigger weapons always get more and more powerful. For this reason you will see a lot of people playing the exact same army copy and past from each other because they are simply the best army lists at the time.
Warmachine mechanics can be a little bit harder to learn at first but they are pretty simple too. Warmachine is all about the combos. Every unit in the game has certain synergies with other units, abilities that play off each other, special tactics that they can do together. So half of the game is learning all the cool tricky combo things you can do with your units. Because of this a game of Warmachine usually boils down to who knows how to play their army better.
Well I could keep going a lot longer on all of the games I mentioned above but this is already a long response. Feel free to message me with any other questions though.