Who Can I Attack?
Combat normally takes place on a battle map with a grid of 1-inch squares, each representing a 5-foot-by-5-foot area, with miniature figures representing characters and monsters. Most player characters and many monsters occupy a single 5-foot square, though some bigger creatures occupy multiple squares. The space a character occupies is usually referred to as her square, though the terms “space” and “square” can be used interchangeably. See Size and Space on page 255 for more information.
In general, you can fire a ranged weapon at any enemy you can see on the battle map, though this becomes harder the farther away an enemy is. Likewise, you can use a melee weapon to attack an enemy in any square you threaten, which means the squares adjacent to your space, including diagonally, though you may be able to attack creatures farther away if you have reach. See Reach and Threatened Squares on page 255 for more details.
Source
Core Rulebook pg. 240