A legislator is a member of the legislative branch of government.
These people are elected by the public to propose bills, hold votes, and pass laws.
The typical responsibilities of a legislator also include developing bills; debating and analyzing the impact of proposed laws; drafting or approving regulations, policies, programs, and budgets; collaborating and negotiating with other legislators; voting on bills; seeking funding for programs and projects; listening to and addressing the concerns of the people they represent, and so on…
Legislators work for the federal government or for other levels of government.
The main aim of a legislator is to represent the interests of the people in his or her district.