When you're given a sentence, the first thing to do is think of any Latin vocab that matches the English: eg. 'forum' is also 'forum' in Latin, and you probably know that a girl is 'puella', if you've used that to learn your 1st declension nouns. A common verb for 'walk' is 'ambulo', but you could have other words like 'adeo' 'I go towards'. 'ad' is the most obvious choice for 'to' here.
The next step is to work out the cases of the nouns: 'girls' are plural, and if you know your first declension, you know that the plural of 'puella' is 'puellae'. 'ad' takes the accusative (as do most prepositions which show motion towards), so forum would be accusative 'forum'.
Then you work out your verb tense, and number so that it agrees with the girls who are the subject: 'were walking' suggests an imperfect verb, and is 3rd person plural, since the girls are plural, so this would be 'ambulabant'.
Word order is flexible, but normally you would have the subject first, object next, and verb at the end.
The full answer is: puellae ad forum ambulabant