A minmaxer or powergamer is someone who makes his character with the sole focus of it being überpowerful. A munchkin is minmaxer that also whines and has no regard for the team.
It is universally agree that powergaming is bad. Here I am not advocating for it, I am simply pointing out how it is done…
Rule 1: Exploit the GM's weaknesses
It is paramount to exploit the GM's weaknesses. The GM is more likely to bend the rules if some crazy stunt mimics one in his favorite movie or book. Also if you make you character look like someone he likes in a film/book, he will look favorably at your minmaxing.
Rule 2: Read and read some more
Read the rules and browse as much as
you can. There are some really good guides out there for the various
classes and spells.
Bonus: make the GM discretely aware that you
care (you've spent time reading), while another player hasn't even read or prepared new spells after
levelling up. You just got mega-brownie points. I once played a game with a rogue who didn't sneak attack and a cleric who didn't
know his spell list: the GM actually encouraged me to minmax.
Rule 3: Don't make yourself a target
Munchkins whine and don't act as team players: bad idea.
Ask other players how much health they have and pretend you're actually thinking of healing them.
Not telling the GM what you're up may halt him from countering your move, but it causes antagonism: best keep it to a minimum and pretend you had a flash of inspiration.
Also, the best defense is flavour armour: if you don't want to lose something, make it appealing to the GM. I once took the leadership feat as a bard and made the followers my 5-piece band (=theme). Not only that, I gave the lowest level one acquired lycanthropy citing that as the feat is broken. Every night this poor schmuck was tied to a tree before nightfall, but not once managed to escape fully (GM controls PC when in werewolf form). Additionally, every time there was a BBEG that could cast cloudkill or similar they never did.
Obviously, the main thing is not to be a minmaxer. Okay?