Generally, they get paid during the filming, if they're being paid a weekly salary, which most film actors are. If they're in Screen Actor's Guild, they also get a cash per diem per week for meals and indidental expenses.