In Captain America: Civil War, the people who side with Steve Rogers, including Wanda Maximoff (Scarlet Witch), Sam Wilson (Falcon), Clint Barton (Hawkeye) & Scott Lang (Ant-Man) are imprisoned by Secretary Ross for aiding Bucky Barnes's (Winter Soldier) escape. Steve Rogers then rescues them from the prison. So all the people mentioned above are wanted fugitives of the US government.
But in Avengers: Infinity War, we see that Natasha Romanoff has also joined them and they are currently hiding in Scotland. However, Natasha sided with Tony Stark and the government in signing the Sokovia accords. Although she does let Steve escape with Bucky in Civil War, she isn't imprisoned by the government and is not considered a fugitive.
What transpired between Civil War and Infinity War that led Natasha Romanoff to go into hiding with Team Captain America?