They get paid only on game weeks. There are 17 game weeks (each team has one bye), so each player's salary is divided into 17 installments and paid on a weekly basis from early September through late December.
If the team makes the playoffs, each player on the team gets paid the same amount of additional money, per playoff game.
Prior to the season (off-season camps, training camps, etc.) players get per diem and travel expenses paid for, but that's it.
Some players also have agreements worked into their contracts for additional types of compensation (workout bonuses, roster bonuses, etc.), but an undrafted free agent isn't going to have any of that. Draft picks will always get some type of signing bonus, which they'll receive as soon as they sign the contract. These range from ~$16 million (in the case of Jameis Winston this year) to ~$56,000 (in the case of Trevor Reilly, a 7th rounder drafted last year). Undrafted free agents sometimes get small signing bonuses too -- I remember the Cards gave Max Hall 5 grand, which is why he signed with them. Heaps may have gotten something small like that, but aside from anything like that, he'll have to make the Jets final roster to make anything from the contract he just signed.