What Smile dog said is almost correct.
The command goes "/effect <player> <effect> [seconds] [amplifier]"
So if I wanted to give the nearest player infinite Strength II, then I would type into the command block: "/effect @p 5 1000000 2".
For more information and a list of effects and usage, check the Minecraft Wiki page about it:
http://www.minecraftwiki.net/wiki/Status_effect