Leopard & Up

1. Launch the System Preferences

2. Select the Security preferences

3. If the Firewall is enabled, make sure Screen Sharing is allowed to connect

Tiger

1. Launch the System Preferences

2. Select the Sharing preferences

3. Make sure Apple Remote Desktop is allowed to receive connections

Windows XP
With RealVNC

1. Open Windows Firewall and make sure RealVNC is visible in the exceptions

Vista and up
With TightVNC

1. Open Windows Firewall and make sure TightVNC is visible in the exceptions