How was it all actually working there, in the dark 16xx-s? Who was the major of a town, what was his duties and capabilities? How were laws issued? How was organized the analog of police: a city guard, or something like that, if there were any, who obeyed they and how were they working? For example, if some crime happens, somebody get murdered, what would be their action? was it really possible for them to solve cases if someone get shoot down or poisoned? Yeah, i know, its hard questions, i d be thankful for any help.
First of all, the 1700s are not the 17th century. The 17th century is 1600-1699. The 1700s are the 18th century counting forward from the birth of Christ as computed by Dionysus Exiguus.
Northern Italy was divided into many different small states, most of which were duchies. A typical example would be the Duchy of Mantua in Lombardy. There were also two large republics: the Republic of Venice and the Republic of Genoa. Each place had its own rules and systems.
Larger cities generally had a night watch as their main form of "police". These were descended from the old Roman watches, called vigiles. For example, in Venice the night watch was known as the Signori di Notti. Smaller towns might have a single watchman, or no one at all.
In Venice the Signori di Notti was a pretty developed organization and actually would investigate crimes, but in most places the watch was just there to be guards and did not have the capacity to be detectives. If there was a serious crime, like a well-known person getting robbed or killed, the local mayor might appoint someone likely to look into it. Of course, the family of the victim was also free to accuse whoever they thought was responsible and try to bring them to court.
How a crime was handled depended a lot on the personalities involved. For example, if a commoner robbed a nobleman, the nobleman would be free to try to find out who the guy was and hunt him down. The nobility had swords and knew how to use them. Usually it was illegal for commoners to have weapons. In some cases if it was unknown who had done it, the aggrieved party might just go and kill a bunch of people from the same "crowd" as a reprisal. When crime occurred to someone of lower station, like a tradesman, he would have to go complain to civil authorities, like the watch, or a mayor and hope they might help him.
Generally speaking, the measures described above were not really a complete solution, because in many cases either no one in authority would be willing to help you, or it would be unclear who the criminal was. In those cases the main option was to hire a vigilante. A vigilante was kind of like a private detective. For money, he would go and do whatever investigating you wanted and in some cases might act against the criminal, if found. This might mean trying to get your money back, hauling the criminal before the courts, beating the criminal or even killing him.
The biggest crime problems were generally between the towns on the open road where there would often be a lawless situation. Roads were sometimes infested with "highwaymen" which were small bands of robbers who would assault and rob passers by. In many cases they would demand just a small amount, sort of a tax. Many travelers would bring a special pouch with money for the purpose of paying off such criminals. Usually these criminals would not kill people or rob large amounts of money, because that would result in the local nobles getting on their horses, sweeping the road and killing anybody suspicious whom they found. Not only would the highwaymen be in danger from the noblemen, but other groups of highwaymen would get angry at them for upsetting the apple cart. Thus, if a criminal got out of hand, he might face other criminals killing him for spoiling their business.