Use your webbing to tie up guards before they can raise the alarm. If the alarm gets raised, hide quickly! The alarm will soon stop if nobody can find you. When the Spidey portrait is darkened, you won't be spotted by guards.